mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
remove unnecessary else branch
This commit is contained in:
parent
d398384b90
commit
bed303a76f
1 changed files with 1 additions and 2 deletions
3
malloc.c
3
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);
|
size_t slot = ffzl(masked | random_split);
|
||||||
if (slot) {
|
if (slot) {
|
||||||
return slot - 1;
|
return slot - 1;
|
||||||
} else {
|
|
||||||
return ffzl(masked) - 1;
|
|
||||||
}
|
}
|
||||||
|
return ffzl(masked) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool has_free_slots(size_t slots, struct slab_metadata *metadata) {
|
static bool has_free_slots(size_t slots, struct slab_metadata *metadata) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue