Re: xfree() -- set ptr to nil (fwd)

Daniel Berlin
2001-02-12T15:46:00Z

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