]> granicus.if.org Git - python/commitdiff
Fix compiler warning in new code. (#14690)
authorTim Peters <tim.peters@gmail.com>
Wed, 10 Jul 2019 21:24:01 +0000 (16:24 -0500)
committerGitHub <noreply@github.com>
Wed, 10 Jul 2019 21:24:01 +0000 (16:24 -0500)
uintptr_t is an integer type, and can't be compared to NULL directly.

Objects/obmalloc.c

index bb154c76ab18143815e0fc02b9c4de9397d9056d..2c00efc255dc3c6f08a6713e85ff9c05121ea9f9 100644 (file)
@@ -1215,7 +1215,7 @@ _Py_GetAllocatedBlocks(void)
     /* add up allocated blocks for used pools */
     for (uint i = 0; i < maxarenas; ++i) {
         /* Skip arenas which are not allocated. */
-        if (arenas[i].address == NULL) {
+        if (arenas[i].address == 0) {
             continue;
         }