Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8f5237

Browse files
author
Charles-François Natali
committed
Remove useless test (flowinfo is unsigned).
2 parents dc00f1e + 9b0c006 commit f8f5237

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/socketmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
14371437
"getsockaddrarg: port must be 0-65535.");
14381438
return 0;
14391439
}
1440-
if (flowinfo < 0 || flowinfo > 0xfffff) {
1440+
if (flowinfo > 0xfffff) {
14411441
PyErr_SetString(
14421442
PyExc_OverflowError,
14431443
"getsockaddrarg: flowinfo must be 0-1048575.");
@@ -5119,7 +5119,7 @@ socket_getnameinfo(PyObject *self, PyObject *args)
51195119
if (!PyArg_ParseTuple(sa, "si|II",
51205120
&hostp, &port, &flowinfo, &scope_id))
51215121
return NULL;
5122-
if (flowinfo < 0 || flowinfo > 0xfffff) {
5122+
if (flowinfo > 0xfffff) {
51235123
PyErr_SetString(PyExc_OverflowError,
51245124
"getsockaddrarg: flowinfo must be 0-1048575.");
51255125
return NULL;

0 commit comments

Comments
 (0)