[Python-checkins] cpython: Re #18521: remove assignments of variables that are immediately reassigned.

georg.brandl python-checkins at python.org
Mon Oct 14 06:52:39 CEST 2013


http://hg.python.org/cpython/rev/7396d10405db
changeset:   86357:7396d10405db
user:        Georg Brandl <georg at python.org>
date:        Mon Oct 14 06:51:46 2013 +0200
summary:
  Re #18521: remove assignments of variables that are immediately reassigned.

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


diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5155,7 +5155,7 @@
     PyObject *all = (PyObject *)NULL;
     PyObject *idna = NULL;
 
-    family = socktype = protocol = flags = 0;
+    socktype = protocol = flags = 0;
     family = AF_UNSPEC;
     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|iiii:getaddrinfo",
                           kwnames, &hobj, &pobj, &family, &socktype,
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -164,7 +164,7 @@
 _PyOS_ascii_strtod(const char *nptr, char **endptr)
 {
     char *fail_pos;
-    double val = -1.0;
+    double val;
     struct lconv *locale_data;
     const char *decimal_point;
     size_t decimal_point_len;

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


More information about the Python-checkins mailing list