[Python-checkins] cpython (merge 3.2 -> default): Remove useless test (flowinfo is unsigned).

charles-francois.natali python-checkins at python.org
Sat Jun 23 10:27:16 CEST 2012


http://hg.python.org/cpython/rev/9cf08b779954
changeset:   77613:9cf08b779954
parent:      77610:aa153b827d17
parent:      77612:55849442d7a9
user:        Charles-François Natali <neologix at free.fr>
date:        Sat Jun 23 10:26:54 2012 +0200
summary:
  Remove useless test (flowinfo is unsigned).

files:
  Modules/socketmodule.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1437,7 +1437,7 @@
                 "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.");
@@ -5119,7 +5119,7 @@
     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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list