[Python-checkins] cpython (3.3): Issue #18549: Eliminate dead code in socket_ntohl().

christian.heimes python-checkins at python.org
Thu Jul 25 11:47:35 CEST 2013


http://hg.python.org/cpython/rev/b7ea3f94f6ca
changeset:   84816:b7ea3f94f6ca
branch:      3.3
parent:      84814:c5d847ee354a
user:        Christian Heimes <christian at cheimes.de>
date:        Thu Jul 25 11:46:10 2013 +0200
summary:
  Issue #18549: Eliminate dead code in socket_ntohl().
CID 982369

files:
  Misc/NEWS              |  2 ++
  Modules/socketmodule.c |  2 --
  2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -52,6 +52,8 @@
 Library
 -------
 
+- Issue #18549: Eliminate dead code in socket_ntohl()
+
 - Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj()
 
 - Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 +
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4702,8 +4702,6 @@
         return PyErr_Format(PyExc_TypeError,
                             "expected int/long, %s found",
                             Py_TYPE(arg)->tp_name);
-    if (x == (unsigned long) -1 && PyErr_Occurred())
-        return NULL;
     return PyLong_FromUnsignedLong(ntohl(x));
 }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list