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: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/53226: cat.c if block never true
Date: Sun, 29 Apr 2018 08:55:58 +0200

 On Sun, Apr 29, 2018 at 04:55:00AM +0000, edgar%pettijohn-web.com@localhost wrote:
 >         else
 >                 raw_args(argv);
 > -       if (fclose(stdout))
 > +       if (fclose(stdout) != 0)
 >                 err(EXIT_FAILURE, "stdout");
 
 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?
 
 Martin
 


Home | Main Index | Thread Index | Old Index