Am Wed, Aug 31, 2022 at 05:36:56PM +0700 schrieb Robert Elz: > The man page for reallocarray() says that reallocarr() was created > to avoid the ambiguity with 0 sized allocations (which stems from > realloc() in posix - because some realloc() implementations behaved > differently than others).
So what did they specify for reallocarray in POSIX now? What does it return if either element size or number of elements is 0? Being able to return NULL in that case is quite desirable and the only reason various malloc implementations do not is crappy code like in xlib that assume a NULL pointer returned is always an error. Joerg