[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] E CVS: libs/ecore sndev



On Sat, 10 Jun 2006 12:25:55 -0500 "Matthew R. Dempsky"
<mrd@alkemio.org> wrote:

> On Sat, Jun 10, 2006 at 07:20:47PM +0200, Kim Woelders wrote:
> > I forgot to mention - I think I have seen cases where c is zero.
> > I'm not sure malloc(0) always is legal.
> 
> It's legal.  Thus spake POSIX[1]:
> 
>     If size is 0, either a null pointer or a unique pointer that can
> be successfully passed to free() shall be returned.

Not everything is compatible with that though.  On the other hand, we
may not care about systems that are not POSIX compliant.  There is a
simple wrapper in gnulib that can deal with that.

Attachment: signature.asc
Description: PGP signature