Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!uwvax!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!usfvax2!chips
From: chips@usfvax2.UUCP (Chip Salzenberg)
Newsgroups: comp.lang.c
Subject: Re: Writing readable code
Message-ID: <792@usfvax2.UUCP>
Date: Thu, 16-Jul-87 13:16:00 EDT
Article-I.D.: usfvax2.792
Posted: Thu Jul 16 13:16:00 1987
Date-Received: Sat, 18-Jul-87 10:16:50 EDT
References: <8270@brl-adm.ARPA>
Organization: AT Engineering, Tampa, FL
Lines: 18
Summary: Neither

John Haugh  wrote:
>
>	if (access (file, 0) && (fd = open (file, 0)) >= 0)
>		good_stuff ()
>	else
>		error_handler ();
>

Just a nit:  I believe that the return value of access() will be zero if
the file does exist; thus the test should be "if (access(...) == 0" etc.

Keeping the world safe for debuggers, this is Chip Salzenberg signing off
at WBUG, Bug Radio.

-- 
Chip Salzenberg		   UUCP: "uunet!ateng!chip" ..or.. "chips@usfvax2.UUCP"
A.T. Engineering, Tampa    Fidonet: 147/40
"Use the Source, Luke!"	   My opinions do not necessarily agree with anything.