Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 0 vs. NULL (RE: Worrisome warnings after recent patches)



Andrej Borsenkow wrote:
> 
> > +         Cline to, tn = NULL;
> 
> 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. 

Bernd

--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



Messages sorted by: Reverse Date, Date, Thread, Author