]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18549: Eliminate dead code in socket_ntohl().
authorChristian Heimes <christian@cheimes.de>
Thu, 25 Jul 2013 09:46:10 +0000 (11:46 +0200)
committerChristian Heimes <christian@cheimes.de>
Thu, 25 Jul 2013 09:46:10 +0000 (11:46 +0200)
CID 982369

Misc/NEWS
Modules/socketmodule.c

index 85238f66742ecfbceb9660d3183f94e159b9144c..7880adb2b70205f4a5abfdee76ac4637fef401a4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -52,6 +52,8 @@ Core and Builtins
 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 +
index 2c8a29cc929610614a050010c5fec84c4eba5e42..1202d38693b82c1a93bb45f4b4769f9da06c3200 100644 (file)
@@ -4702,8 +4702,6 @@ socket_ntohl(PyObject *self, PyObject *arg)
         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));
 }