From owner-cvs-all Fri Jul 24 00:58:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA10977 for cvs-all-outgoing; Fri, 24 Jul 1998 00:58:47 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA10962 for ; Fri, 24 Jul 1998 00:58:44 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id RAA16630; Fri, 24 Jul 1998 17:58:09 +1000 Date: Fri, 24 Jul 1998 17:58:09 +1000 From: Bruce Evans Message-Id: <199807240758.RAA16630@godzilla.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 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> > 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