This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] asprintf() -> xasprintf()
- To: fche at redhat dot com (Frank Ch. Eigler)
- Subject: Re: [rfc] asprintf() -> xasprintf()
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Tue, 14 Nov 2000 16:07:16 +0000
- Cc: Fernando Nasser <fnasser at cygnus dot com>, Andrew Cagney <ac131313 at cygnus dot com>, GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
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.