]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
obmalloc: Remove unused variable. (GH-98770)
authorBenjamin Peterson <benjamin@python.org>
Thu, 27 Oct 2022 16:06:49 +0000 (09:06 -0700)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 16:06:49 +0000 (09:06 -0700)
Objects/obmalloc.c

index 1d487d8e807a22ad46a00a85ff0e30ef05483094..449b618a0e76a0d97b4249c3ecf23dff7c60b842 100644 (file)
@@ -3000,7 +3000,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. */
@@ -3019,8 +3018,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;