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: xfree() -- set ptr to nil (fwd)




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


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