This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: xfree() -- set ptr to nil (fwd)
- To: "John R. Moore" <jmoore at cygnus dot com>
- Subject: Re: xfree() -- set ptr to nil (fwd)
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: Mon, 12 Feb 2001 18:46:33 -0500 (EST)
- cc: Kevin Buettner <kevinb at cygnus dot com>, <gdb-patches at sources dot redhat dot com>
On Mon, 12 Feb 2001, John R. Moore wrote:
>
> Yes, I've usually seen this as a macro
>
> #define XFREE(ptr) do \
> { \
> if (ptr) \
> { \
> free (ptr); \
> ptr = NULL; \
> } \
> } while (0)
>
> Ok, then, do we want to replace xfree() with something like XFREE() ?
No, we try to get *rid* of macros, not add them.
--Dan