From owner-freebsd-chat Wed Aug 9 22:31:14 2000 Delivered-To: freebsd-chat@freebsd.org Received: from mail.ptd.net (mail2.ha-net.ptd.net [207.44.96.66]) by hub.freebsd.org (Postfix) with SMTP id 3F16E37B775 for ; Wed, 9 Aug 2000 22:31:12 -0700 (PDT) (envelope-from tms2@mail.ptd.net) Received: (qmail 3971 invoked from network); 10 Aug 2000 05:31:10 -0000 Received: from du28.cli.ptd.net (HELO mail.ptd.net) (204.186.33.28) by mail.ptd.net with SMTP; 10 Aug 2000 05:31:10 -0000 Message-ID: <39923E04.94A1B30E@mail.ptd.net> Date: Thu, 10 Aug 2000 01:30:44 -0400 From: "Thomas M. Sommers" Organization: None X-Mailer: Mozilla 4.72 [en] (X11; I; FreeBSD 4.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Mark Ovens , chat@FreeBSD.ORG Subject: Re: C time functions - problem References: <20000808201807.H250@parish> <20000808122832.I4854@fw.wintelcom.net> <39908B06.D1238928@mail.ptd.net> <20000809150804.L4854@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Alfred Perlstein wrote: > > * Thomas M. Sommers [000808 17:46] wrote: > > Alfred Perlstein wrote: > > > > > > Don't cast 0 to a pointer type, use NULL. > > > > Or just use 0. > > Not if you want me to accept the code. According to the (draft) standard, section 6.3.2.3: "An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant. If a null pointer constant is converted to a pointer type, the resulting pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function." There are very few circumstances in which you need to cast 0 to make it a null pointer constant. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message