NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/53226: cat.c if block never true



The following reply was made to PR bin/53226; it has been noted by GNATS.

From: Paul Goyette <paul%whooppee.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, edgar%pettijohn-web.com@localhost
Subject: Re: bin/53226: cat.c if block never true
Date: Sun, 29 Apr 2018 15:11:53 +0800 (+08)

 On Sun, 29 Apr 2018, Martin Husemann wrote:
 
 > Well, fclose(3) says:
 >
 > RETURN VALUES
 >      Upon successful completion 0 is returned.  Otherwise, EOF is returned and
 >      the global variable errno is set to indicate the error.  In either case
 >      no further access to the stream is possible.
 >
 >
 > and EOF certainly is != 0, so this change is stylistic only?
 
 fclose(3) also indicates that other return values (from close(3) among
 others) are also possible.  So checking explicitly for EOF would not be
 correct.
 


Home | Main Index | Thread Index | Old Index