This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] asprintf() -> xasprintf()


Fernando Nasser wrote:
> 
> Richard Earnshaw wrote:
> >
> > fche@redhat.com said:
> > > Fernando Nasser <fnasser@cygnus.com> writes:
> > > : Good catch.  No more memory would cause an attempt to free NULL. :
> > > (Have you ever considered a FREE macro that tests for NULL pointers?
> > > [...]
> >
> > > free(NULL) is defined in even old standards to be a no-op.
> >
> > Then somebody had better tell sunos that: I don't think it was listening
> > :-)
> >
> > R.
> >
> > free(NULL) is not defined on older machines -- it came in with ANSI.
> 
> Well, we did move GDB to ANSI, but I don't fell comfortable just assuming that
> all free() implementations are already compliant.

Not even all ANSI free impls?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]