From: Guido van Rossum Date: Fri, 7 Jun 2002 19:55:29 +0000 (+0000) Subject: Move the conex_finally label up, so that the errno value is always X-Git-Tag: v2.3c1~5417 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1790e65d43dae0cd59f8008b3549a017ff4f16d6;p=thirdparty%2FPython%2Fcpython.git Move the conex_finally label up, so that the errno value is always returned. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 49dd33245f0c..e2d499a28ff7 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1462,6 +1462,7 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro) Py_END_ALLOW_THREADS } +conex_finally: if (res != 0) { #ifdef MS_WINDOWS res = WSAGetLastError(); @@ -1470,7 +1471,6 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro) #endif } -conex_finally: return PyInt_FromLong((long) res); }