]> granicus.if.org Git - gc/commitdiff
Remove redundant check that clear_fl_marks argument is non-null
authorIvan Maidanski <ivmai@mail.ru>
Mon, 14 Aug 2017 08:01:57 +0000 (11:01 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 14 Aug 2017 08:02:07 +0000 (11:02 +0300)
(code refactoring)

* alloc.c (GC_clear_fl_marks): Do not check that q is not null (because
it is checked by the caller).

alloc.c

diff --git a/alloc.c b/alloc.c
index 0f18301e880cf3d5e0b784360c7db575f07c9615..b038940e1231f30b6fd32ce1ab847939b1ea8fb1 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -846,7 +846,6 @@ GC_INNER void GC_set_fl_marks(ptr_t q)
 /* Decrement GC_bytes_found by number of bytes on free list.    */
 STATIC void GC_clear_fl_marks(ptr_t q)
 {
-    if (q != NULL) {
       struct hblk *h = HBLKPTR(q);
       struct hblk *last_h = h;
       hdr *hhdr = HDR(h);
@@ -880,7 +879,6 @@ STATIC void GC_clear_fl_marks(ptr_t q)
           sz = hhdr->hb_sz;
         }
       }
-    }
 }
 
 #if defined(GC_ASSERTIONS) && defined(THREADS) && defined(THREAD_LOCAL_ALLOC)