Can realloc(p,0) return NULL when p is non-NULL and memory aplenty?

Can realloc(p,0) return NULL when p is non-NULL and memory aplenty?

Post by Joachim Sc » Sat, 08 Mar 2008 03:31:30



I don't read it mlike this

The realloc function returns a pointer to the new object (which may have the
same
value as a pointer to the old object), or a null pointer if the new object
could not be
allocated.

allocating 0 bytes can't be too difficult ;-), so no compelling reason to
return NULL

Bye, Jojo