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



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