mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 10:50:08 +00:00
Update.
* malloc/malloc.c (request2size): Also set errno of failing.
This commit is contained in:
parent
597d10a00a
commit
9ae6fc542a
@ -1,5 +1,7 @@
|
||||
1999-07-07 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* malloc/malloc.c (request2size): Also set errno of failing.
|
||||
|
||||
* malloc/malloc.c (request2size): Take care of overflow in
|
||||
addition.
|
||||
|
||||
|
@ -822,6 +822,10 @@ do { \
|
||||
computed. */
|
||||
|
||||
|
||||
/* Macro to set errno. */
|
||||
#ifndef __set_errno
|
||||
# define __set_errno(val) errno = (val)
|
||||
#endif
|
||||
|
||||
/* On some platforms we can compile internal, not exported functions better.
|
||||
Let the environment provide a macro and define it to be empty if it
|
||||
@ -1264,7 +1268,8 @@ static void free_atfork();
|
||||
#define request2size(req, nb) \
|
||||
((nb = (req) + (SIZE_SZ + MALLOC_ALIGN_MASK)),\
|
||||
((long)nb <= 0 || nb < (INTERNAL_SIZE_T) (req) \
|
||||
? 1 : ((nb < (MINSIZE + MALLOC_ALIGN_MASK) \
|
||||
? (__set_errno (ENOMEM), 1) \
|
||||
: ((nb < (MINSIZE + MALLOC_ALIGN_MASK) \
|
||||
? (nb = MINSIZE) : (nb &= ~MALLOC_ALIGN_MASK)), 0)))
|
||||
|
||||
/* Check if m has acceptable alignment */
|
||||
|
Loading…
Reference in New Issue
Block a user