On Sunday, December 17, 2000, Jacques A. Vidrine wrote:
> What do folks think about
> 
>   1)    if (data)
>                 free(data);
> 
> versus
> 
>   2)    free(data);
> 
> versus
> 
>   3)    #define xfree(x) if ((x) != NULL) free(x);
>         xfree(data);

   2.  The C standard dictates that free() does nothing when it
gets a NULL argument.  The other two are just extra clutter.

-- 
+-------------------+-------------------------------------------------+
| Chris Costello    | This system will self-destruct in five minutes. |
| [EMAIL PROTECTED] |                                                 |
+-------------------+-------------------------------------------------+


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to