🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cs.forum
Article #5

Re: Help: a very segmentation fault!

#5
From: Dan Pop
Date: Tue, 16 Apr 1996 18:03
24 lines
1373 bytes
In <4kisn3$jbi@eng_ser1.erg.cuhk.hk> mfchan@cs.cuhk.hk (I'm a good man) writes:

>NULL = '\0' = 0. Defined in stdio.h or stdlib.h

You might be a good man, but this doesn't prevent you from being an
ignorant man, as well :-)

It is true that '\0' and 0 are the same.  They both have the same type and
value.  It is also true that 0 can be always used instead of NULL, but
the reciprocal is not necessarily true.  Proof:

    cnwgs1:~ 1> grep NULL /usr/include/stdio.h
    #ifndef NULL
    #define NULL    ((void *)0)

BTW, NULL is defined in <locale.h>, <stddef.h>, <stdio.h>, <stdlib.h>,
<string.h> and <time.h>.

Dan
--
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID: <danpop.829677808@news.cern.ch>
Path: arc1-ca.pugleaf.net!news.cern.ch!danpop
References: <4ki7gu$bgc@eng_ser1.erg.cuhk.hk> <4kinqm$hnt@eng_ser1.erg.cuhk.hk> <4kiptc$ih5@eng_ser1.erg.cuhk.hk> <4kisn3$jbi@eng_ser1.erg.cuhk.hk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.cern.ch!danpop
From: danpop@mail.cern.ch (Dan Pop)
Newsgroups: cs.forum,cuhk.se.3420,comp.lang.c
Subject: Re: Help: a very segmentation fault!
Date: 16 Apr 96 18:03:28 GMT
Organization: CERN European Lab for Particle Physics
Message-ID: <danpop.829677808@news.cern.ch>
References: <4ki7gu$bgc@eng_ser1.erg.cuhk.hk> <4kinqm$hnt@eng_ser1.erg.cuhk.hk> <4kiptc$ih5@eng_ser1.erg.cuhk.hk> <4kisn3$jbi@eng_ser1.erg.cuhk.hk>
NNTP-Posting-Host: ues5.cern.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Newsreader: NN version 6.5.0 #7 (NOV)