🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #2320

Re: [C++] fwrite + segmentation fault

#2320
From: Nicolas Barbier
Date: Mon, 19 Jul 2004 10:59
17 lines
1800 bytes
MaG wrote:

> Null is niet altijd gelijk aan 0, hangt van de implementatie af.

(NULL == 0) is implementatie-onafhankelijk steeds true. De mogelijke
definities voor NULL zijn (void *) 0 en gewoon 0.

> Moet eigenlijk (_file == (FILE *)0) zijn.

In deze context wordt 0 geinterpreteerd als pointer, en is de (FILE *)
nergens voor nodig (behalve eventueel duidelijkheid). De enige
probleemgevallen zijn die waarin een pointer en een integer beiden mogelijk
zijn, bijvoorbeeld als argument bij een printf functieoproep.

-- 
Nicolas Barbier
Protecting innovation against patent inflation <url:http://swpat.ffii.org/>
Technical Details
Message-ID: <40fba9ab$0$8988$6c56d894@feed0.news.be.easynet.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!peernews3.colt.net!colt.net!easynet.net!easynet-melon!feed0.news.be.easynet.net!not-for-mail
References: <6euaf0th4h3ctr13l2lk2se4lmbu39ueu6@4ax.com> <wfzJc.186138$XZ1.8812637@phobos.telenet-ops.be> <n3tdf018psossgbcc1ohrcgo8kbk3kastb@4ax.com> <tjEJc.1465$Ci.295274988@hestia.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,33ec3f0617e4db5
X-Google-Attributes: gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!peernews3.colt.net!colt.net!easynet.net!easynet-melon!feed0.news.be.easynet.net!not-for-mail
Message-ID: <40fba9ab$0$8988$6c56d894@feed0.news.be.easynet.net>
From: Nicolas Barbier <reply@in.group.invalid>
Subject: Re: [C++] fwrite + segmentation fault
Newsgroups: be.comp.programming
Date: Mon, 19 Jul 2004 12:59:56 +0200
References: <6euaf0th4h3ctr13l2lk2se4lmbu39ueu6@4ax.com> <wfzJc.186138$XZ1.8812637@phobos.telenet-ops.be> <n3tdf018psossgbcc1ohrcgo8kbk3kastb@4ax.com> <tjEJc.1465$Ci.295274988@hestia.telenet-ops.be>
User-Agent: KNode/0.7.7
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 17
Organization: [ posted via Easynet Belgium ]
NNTP-Posting-Date: 19 Jul 2004 10:59:55 GMT
NNTP-Posting-Host: 81.188.75.66
X-Trace: 1090234795 feed0.news.be.easynet.net 8988 [::ffff:81.188.75.66]:32820
X-Complaints-To: abuse@be.easynet.net