From: Charles-François Natali Date: Sat, 23 Jun 2012 08:06:56 +0000 (+0200) Subject: Remove useless test (flowinfo is unsigned). X-Git-Tag: v2.7.4rc1~748 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65dd745fecd2468ab9471ef21bff7e0345470734;p=python Remove useless test (flowinfo is unsigned). --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index c5215211f5..70da7c5b18 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1310,7 +1310,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."); @@ -4181,7 +4181,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;