mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
malloc: Simplify checked_request2size interface
In-band signaling avoids an uninitialized variable warning when building with -Og and GCC 12. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
@ -275,7 +275,8 @@ realloc_check (void *oldmem, size_t bytes)
|
||||
malloc_printerr ("realloc(): invalid pointer");
|
||||
const INTERNAL_SIZE_T oldsize = chunksize (oldp);
|
||||
|
||||
if (!checked_request2size (rb, &chnb))
|
||||
chnb = checked_request2size (rb);
|
||||
if (chnb == 0)
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
goto invert;
|
||||
|
Reference in New Issue
Block a user