bug-gnulib
[Top][All Lists]
Advanced

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

Re: strfile: new module


From: Ralf Wildenhues
Subject: Re: strfile: new module
Date: Sat, 27 May 2006 13:01:42 +0200
User-agent: Mutt/1.5.11+cvs20060403

* Simon Josefsson wrote on Sat, May 27, 2006 at 12:35:21PM CEST:
> 
> I hadn't actually even compiled the module..

Let's put it this way: Using a mailing list to fix trivial
compile warnings doesn't encourage further code reviews.

* Simon Josefsson wrote on Sat, May 27, 2006 at 12:40:37PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> >
> > You pass NULL to realloc and possibly to free but are not
> > depending on the realloc and free modules.
> 
> The free case was fixed in the last e-mail, but isn't realloc supposed
> to handle NULL?

$ sed 2q modules/free
Description:
Work around incompatibility on older systems where free (NULL) fails.

$ info Autoconf "Function Portability"  # CVS Autoconf
| `free'
|      The C standard says a call `free (NULL)' does nothing, but some
|      old systems don't support this (e.g., NextStep).
[...]
| `realloc'
|      The C standard says a call `realloc (NULL, size)' is equivalent to
|      `malloc (size)', but some old systems don't support this (e.g.,
|      NextStep).

Granted, this really isn't wide-spread any more nowadays.
(UNICOS had this at one time, too; I merely still jump at
it today because I had to learn it the hard way back then.)

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]