mirror of git://sourceware.org/git/glibc.git
malloc: Remove redundant NULL check
Remove a redundant NULL check from tcache_get_n. Reviewed-by: Cupertino Miranda <cupertino.miranda@oracle.com>
This commit is contained in:
parent
9716ee567a
commit
089b4fb90f
|
|
@ -3208,11 +3208,10 @@ tcache_get_n (size_t tc_idx, tcache_entry **ep, bool mangled)
|
|||
if (__glibc_unlikely (misaligned_mem (e)))
|
||||
malloc_printerr ("malloc(): unaligned tcache chunk detected");
|
||||
|
||||
void *ne = e == NULL ? NULL : REVEAL_PTR (e->next);
|
||||
if (!mangled)
|
||||
*ep = ne;
|
||||
*ep = REVEAL_PTR (e->next);
|
||||
else
|
||||
*ep = PROTECT_PTR (ep, ne);
|
||||
*ep = PROTECT_PTR (ep, REVEAL_PTR (e->next));
|
||||
|
||||
++(tcache->num_slots[tc_idx]);
|
||||
e->key = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue