[Python-checkins] obmalloc: Remove unused variable. (GH-98770)

miss-islington webhook-mailer at python.org
Thu Oct 27 12:31:23 EDT 2022


https://github.com/python/cpython/commit/cfbc01fe48517c4cc15e4ad6f8cf08d273307ca9
commit: cfbc01fe48517c4cc15e4ad6f8cf08d273307ca9
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-27T09:30:46-07:00
summary:

obmalloc: Remove unused variable. (GH-98770)

(cherry picked from commit bded5edd9abf7ae6b2874916d70ec29ad209217c)

Co-authored-by: Benjamin Peterson <benjamin at python.org>

files:
M Objects/obmalloc.c

diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index ce5da5f1b7b9..fae9c8110f19 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -2999,7 +2999,6 @@ _PyObject_DebugMallocStats(FILE *out)
      * will be living in full pools -- would be a shame to miss them.
      */
     for (i = 0; i < maxarenas; ++i) {
-        uint j;
         uintptr_t base = arenas[i].address;
 
         /* Skip arenas which are not allocated. */
@@ -3018,8 +3017,7 @@ _PyObject_DebugMallocStats(FILE *out)
 
         /* visit every pool in the arena */
         assert(base <= (uintptr_t) arenas[i].pool_address);
-        for (j = 0; base < (uintptr_t) arenas[i].pool_address;
-             ++j, base += POOL_SIZE) {
+        for (; base < (uintptr_t) arenas[i].pool_address; base += POOL_SIZE) {
             poolp p = (poolp)base;
             const uint sz = p->szidx;
             uint freeblocks;



More information about the Python-checkins mailing list