From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21624 invoked from network); 4 Mar 1999 10:43:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Mar 1999 10:43:19 -0000 Received: (qmail 18026 invoked by alias); 4 Mar 1999 10:42:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5639 Received: (qmail 18017 invoked from network); 4 Mar 1999 10:42:54 -0000 Date: Thu, 4 Mar 1999 11:42:10 +0100 (MET) Message-Id: <199903041042.LAA02458@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Bruce Stephens's message of 04 Mar 1999 10:35:16 +0000 Subject: Re: 0 vs. NULL (RE: Worrisome warnings after recent patches) Bruce Stephens wrote: > Bernd Eggink writes: > > > Andrej Borsenkow wrote: > > > > What is the point of using NULL to initialize null pointer. The only > > > portable and official way is to use `0'(zero), that is garanteed to be > > > converted to whatever representation null pointer has on a given system. > > > > No, this applies to C++ only, not to C. In C you should use the NULL > > macro or (void*)0. > > There's an issue with arguments to functions which don't have > prototypes, but apart from that, the literal 0 as a pointer should be > fine in C. Since the original message was a reaction to my patch: I know that `0' should be fine in C (at least with modern compilers) and personally I prefer it. But using `NULL' is the convention used throughout the zsh code, so... Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de