[Andrew Pimlott <pimlott@abel.MATH.HARVARD.EDU>] realloc(p, 0) vs. free
Wolfram Gloger
wmglo@dent.med.uni-muenchen.de
Thu Apr 29 01:13:00 GMT 1999
> No. Please look at the change I've added.
>
> realloc (NULL, 0) == malloc (0)
>
> realloc (ptr, 0) == free (ptr)
OK, that adds at least a little bit of consistency.
Of course I agree that standards compliance takes precedence over
almost anything, I was just surprised that the standard would allow
malloc(0) to behave in two ways while defining the analogous realloc()
rigorously.
Regards,
Wolfram.
--
`Surf the sea, not double-u three...'
wmglo@dent.med.uni-muenchen.de
More information about the Libc-alpha
mailing list