[Python-checkins] cpython (3.2): 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/55849442d7a9
changeset: 77612:55849442d7a9
branch: 3.2
parent: 77560:ffc048f43a70
user: Charles-François Natali <neologix at free.fr>
date: Sat Jun 23 10:17:05 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
@@ -1347,7 +1347,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.");
@@ -4129,7 +4129,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

AltStyle によって変換されたページ (->オリジナル) /