summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c521521..70da7c5 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;