Date: Sun, 17 Dec 2000 15:17:35 -0600 From: Chris Costello <chris@calldei.com> To: "Jacques A. Vidrine" <n@nectar.com> Cc: hackers@FreeBSD.ORG Subject: Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c) Message-ID: <20001217151735.D54486@holly.calldei.com> In-Reply-To: <20001217151509.A63051@hamlet.nectar.com> References: <200012172110.eBHLAfU46563@freefall.freebsd.org> <20001217151509.A63051@hamlet.nectar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. | | chris@calldei.com | | +-------------------+-------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001217151735.D54486>