[Python-checkins] Eliminate duplicated assignment in _randommodule.c (GH-25904)

rhettinger webhook-mailer at python.org
Tue May 4 23:41:32 EDT 2021


https://github.com/python/cpython/commit/23362f8c301f72bbf261b56e1af93e8c52f5b6cf
commit: 23362f8c301f72bbf261b56e1af93e8c52f5b6cf
branch: main
author: Brad Larsen <brad.larsen at trailofbits.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2021-05-04T20:41:11-07:00
summary:

Eliminate duplicated assignment in _randommodule.c (GH-25904)

files:
M Modules/_randommodule.c

diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index cae49a009cbcc..0137e34da650a 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -597,7 +597,7 @@ _random_exec(PyObject *module)
     }
 
     /* Look up and save int.__abs__, which is needed in random_seed(). */
-    PyObject *longval = longval = PyLong_FromLong(0);
+    PyObject *longval = PyLong_FromLong(0);
     if (longval == NULL) {
         return -1;
     }



More information about the Python-checkins mailing list