[tz] [PATCH 1/3] Assume C89.
Jonathan M Davis
jmdavisProg at gmx.com
Fri Oct 12 17:26:36 UTC 2012
On Friday, October 12, 2012 17:09:15 Paul_Koning at Dell.com wrote:
> On Oct 12, 2012, at 12:24 PM, Todd C. Miller wrote:
> > For this bit in date.c:
> >
> > - found = select(FD_SETSIZE, &ready, (fd_set *)0, (fd_set *)0,
> > &tout); + found = select(FD_SETSIZE, &ready, 0, 0, &tout);
> >
> > You probably want to use NULL, not a bare 0 for the 3rd and 4th
> > arguments.
>
> Makes no difference; NULL is just a macro that translates to 0, sometimes
> with a mostly-unnecessary cast to void*.
Actually, I've heard of systems where it _did_ differ for some bizarre reason
(which I think is why some recommend that you always use 0 and never NULL),
which resulted in very bizarre behavior if you checked pointers for true or
false directly or mixed 0 and NULL. But normally, NULL is 0, and any system
where that's not true is definitely abnormal.
- Jonathan M Davis
More information about the tz
mailing list