From: Charles-François Natali Date: Sat, 23 Jun 2012 08:17:05 +0000 (+0200) Subject: Remove useless test (flowinfo is unsigned). X-Git-Tag: v3.3.0b1~133^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b0c006eb0fa1c8b2514067fdcf6350a45722417;p=thirdparty%2FPython%2Fcpython.git Remove useless test (flowinfo is unsigned). --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 320227fa8609..338622dfcc6c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1347,7 +1347,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, "getsockaddrarg: port must be 0-65535."); return 0; } - if (flowinfo < 0 || flowinfo > 0xfffff) { + if (flowinfo > 0xfffff) { PyErr_SetString( PyExc_OverflowError, "getsockaddrarg: flowinfo must be 0-1048575."); @@ -4129,7 +4129,7 @@ socket_getnameinfo(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(sa, "si|II", &hostp, &port, &flowinfo, &scope_id)) return NULL; - if (flowinfo < 0 || flowinfo > 0xfffff) { + if (flowinfo > 0xfffff) { PyErr_SetString(PyExc_OverflowError, "getsockaddrarg: flowinfo must be 0-1048575."); return NULL;