common: make sure *alloc(0) returns NULL.
authorKrisztian Litkey <kli@iki.fi>
Sat, 16 Mar 2013 11:16:23 +0000 (13:16 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Wed, 27 Mar 2013 09:14:16 +0000 (11:14 +0200)
commitd8335be6c08009d0ae9dc579e43ff96ca6ddafc0
treea326e206c77fa0c89cb4614c2965679ed0e31f7b
parent59d465213f45b37f053b5d4eb6958d16c24f033a
common: make sure *alloc(0) returns NULL.

The C standard allows [mc]alloc(0) to return a unique non-NULL pointer
instead of NULL and indeed the stock allocator in recent versions of
glibc does behave this way. We prefer our zero-sized chunks of memory
to be represented by NULL, so we take care of this in the allocator
wrappers.
src/common/mm.c