From 65dd745fecd2468ab9471ef21bff7e0345470734 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Charles-Fran=C3=A7ois=20Natali?= Date: Sat, 23 Jun 2012 10:06:56 +0200 Subject: [PATCH] Remove useless test (flowinfo is unsigned). --- Modules/socketmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.50.1