Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 0 vs. NULL (RE: Worrisome warnings after recent patches)
- X-seq: zsh-workers 5639
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: 0 vs. NULL (RE: Worrisome warnings after recent patches)
- Date: Thu, 4 Mar 1999 11:42:10 +0100 (MET)
- In-reply-to: Bruce Stephens's message of 04 Mar 1999 10:35:16 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bruce Stephens wrote:
> Bernd Eggink <eggink@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author