From bed303a76f86fdb13024d955345cfd77c9d61f35 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 7 Sep 2018 00:22:51 -0400 Subject: [PATCH] remove unnecessary else branch --- malloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/malloc.c b/malloc.c index 7790261..04e2c77 100644 --- a/malloc.c +++ b/malloc.c @@ -210,9 +210,8 @@ static size_t get_free_slot(struct random_state *rng, size_t slots, struct slab_ size_t slot = ffzl(masked | random_split); if (slot) { return slot - 1; - } else { - return ffzl(masked) - 1; } + return ffzl(masked) - 1; } static bool has_free_slots(size_t slots, struct slab_metadata *metadata) {