Thread (10 messages) flat view 10 messages, 4 authors, 2016-06-15

Re: [PATCH 2/4] short circuit out of a few places where we would allocate zero bytes

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:15

Hi,

On Sat, 24 Dec 2005, Eric Wong wrote:
dietlibc versions of malloc, calloc and realloc all return NULL if
they're told to allocate 0 bytes, causes the x* wrappers to die().

There are several more places where these calls could end up asking
for 0 bytes, too...

Maybe simply not die()-ing in the x* wrappers if 0/NULL is returned
when the requested size is zero is a safer and easier way to go.
I would prefer that, too. But the cleanest way would be to prevent calls 
to *alloc if the size is 0...

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help