]> granicus.if.org Git - python/commitdiff
remove assignment in conditional
authorBenjamin Peterson <benjamin@python.org>
Wed, 1 Apr 2015 15:16:40 +0000 (11:16 -0400)
committerBenjamin Peterson <benjamin@python.org>
Wed, 1 Apr 2015 15:16:40 +0000 (11:16 -0400)
Modules/socketmodule.c

index e9feba378e6021d824760a9b08e7ea28ca7cabed..e9e482e874608ab1fc7c6aefb9d0281be0a0f408 100644 (file)
@@ -5268,7 +5268,8 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
         goto err;
     }
 
-    if ((all = PyList_New(0)) == NULL)
+    all = PyList_New(0);
+    if (all == NULL)
         goto err;
     for (res = res0; res; res = res->ai_next) {
         PyObject *single;