summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/socketmodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index d95121e..dae40a9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -166,6 +166,8 @@ Core and Builtins
Library
-------
+- Issue #18549: Eliminate dead code in socket_ntohl()
+
- Issue #18530: Remove additional stat call from posixpath.ismount.
Patch by Alex Gaynor.
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 0fd14ab..1e2e84f 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4663,8 +4663,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));
}