Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 1998 17:58:09 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        ache@nagual.pp.ru, bde@zeta.org.au, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/inetd inetd.c
Message-ID:  <199807240758.RAA16630@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >  Modified files:
>> >    usr.sbin/inetd       inetd.c 
>> >  Log:
>> >  Use NULL as gettimeofday arg instead of 0 cast
>> 
>> Why subtract value like that?  The 0 cast was necessary and sufficent
>
>NULL can be not equal to 0. It seems proper way to keep K&R will be 
>(struct timezone *)NULL but it is superfluous.

NULL _is_ equal to 0.  It can even be lexically equal to 0, and is
in FreeBSD.  Both (struct timezone *)NULL and (struct timezone *)0
are proper for K&R.  The cast is _not_ superfluous.  The cast is still
necessary if NULL is ((void *)0), since `void *' is not compatible with
`struct timezone *'.  The only real differerence in ANSI C here is that
ANSI C has prototypes, so a prototype may be in scope; if a (correct)
prototype is in scope, then it will provide the cast.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807240758.RAA16630>