[Python-checkins] cpython (3.4): remove assignment in conditional

benjamin.peterson python-checkins at python.org
Wed Apr 1 18:37:38 CEST 2015


https://hg.python.org/cpython/rev/47451f6e7e75
changeset:   95352:47451f6e7e75
branch:      3.4
parent:      95347:26778732099d
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Apr 01 11:16:40 2015 -0400
summary:
  remove assignment in conditional

files:
  Modules/socketmodule.c |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5268,7 +5268,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 *single;

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list