]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
obmalloc: Remove unused variable. (GH-98770)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 27 Oct 2022 16:33:44 +0000 (09:33 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 16:33:44 +0000 (09:33 -0700)
(cherry picked from commit bded5edd9abf7ae6b2874916d70ec29ad209217c)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Objects/obmalloc.c

index ed8dd5a5042d5dda389698d49f73316c9cb5a0d7..224206b932c1efa208299d913d7d5798dec20670 100644 (file)
@@ -2962,7 +2962,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. */
@@ -2981,8 +2980,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;