From 4fd929b431214678184bddc7a5bb5c610dda5485 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 1 Apr 2015 11:16:40 -0400 Subject: [PATCH] remove assignment in conditional --- Modules/socketmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index e9feba378e6..e9e482e8746 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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;