From: Christian Heimes Date: Thu, 25 Jul 2013 09:46:10 +0000 (+0200) Subject: Issue #18549: Eliminate dead code in socket_ntohl(). X-Git-Tag: v3.4.0a1~88^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9228837e310cf37f5d2ce662fcd8d83424ef6fa6;p=thirdparty%2FPython%2Fcpython.git Issue #18549: Eliminate dead code in socket_ntohl(). CID 982369 --- diff --git a/Misc/NEWS b/Misc/NEWS index 85238f66742e..7880adb2b702 100644 --- 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 + diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 2c8a29cc9296..1202d38693b8 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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)); }