[Python-checkins] cpython (2.7): Remove useless test (flowinfo is unsigned).
charles-francois.natali
python-checkins at python.org
Sat Jun 23 10:27:15 CEST 2012
http://hg.python.org/cpython/rev/e5478b6b93b5
changeset: 77611:e5478b6b93b5
branch: 2.7
parent: 77568:10faad45905a
user: Charles-François Natali <neologix at free.fr>
date: Sat Jun 23 10:06:56 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
@@ -1310,7 +1310,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.");
@@ -4181,7 +4181,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