]> granicus.if.org Git - python/commitdiff
Remove useless test (flowinfo is unsigned).
authorCharles-François Natali <neologix@free.fr>
Sat, 23 Jun 2012 08:17:05 +0000 (10:17 +0200)
committerCharles-François Natali <neologix@free.fr>
Sat, 23 Jun 2012 08:17:05 +0000 (10:17 +0200)
Modules/socketmodule.c

index 320227fa860939ca7c1e6d6720cf0a1dccc18802..338622dfcc6ca5fb327094c277bb6712cc6f0019 100644 (file)
@@ -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;