remove unnecessary special case from realloc
parent
f441dfe2e3
commit
c3a4829d77
5
malloc.c
5
malloc.c
|
@ -799,11 +799,6 @@ EXPORT void *h_realloc(void *old, size_t size) {
|
||||||
|
|
||||||
enforce_init();
|
enforce_init();
|
||||||
|
|
||||||
if (size == 0) {
|
|
||||||
deallocate(old);
|
|
||||||
return allocate(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t old_size;
|
size_t old_size;
|
||||||
if (old >= ro.slab_region_start && old < ro.slab_region_end) {
|
if (old >= ro.slab_region_start && old < ro.slab_region_end) {
|
||||||
old_size = slab_usable_size(old);
|
old_size = slab_usable_size(old);
|
||||||
|
|
Loading…
Reference in New Issue