remove assignment in conditional
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index e9e4479..cbc3223 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -4207,7 +4207,8 @@
         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 *addr =