🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1513

What about errno==0 ?

#1513
From: Bjoern Kriews
Date: Sun, 15 Jul 1990 04:47
17 lines
964 bytes
Hi !

I am want to let my code now whether a routine returning NULL on failure
failed because of an I/O Error are for a logical mistake. For example,
I'm setting a global variable = errno after a failed malloc(), then do
an fclose() and return. I want to set this global to zero if the code
failed because of any error not setting errno. 

My question is:
What does the standard say about the value 0 for errno ?
Can I assume that there is no errno.h defining any errorcode = 0 ?

Any help appreciated,
  Bjoern

--
bkr@mcshh.hanse.de - Bjoern Kriews / Stormsweg 6 / 2000 Hamburg 76 / W-Germany
Technical Details
Message-ID: <7798@mcshh.hanse.de>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!gopnbg!mcshh!bkr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!gopnbg!mcshh!bkr
From: bkr@mcshh.hanse.de (Bjoern Kriews)
Newsgroups: comp.std.c
Subject: What about errno==0 ?
Keywords: errno, errorcheck, standard
Message-ID: <7798@mcshh.hanse.de>
Date: 15 Jul 90 04:47:36 GMT
Distribution: comp
Lines: 17