Source-Changes-HG archive

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

[src/trunk]: src/bin/echo echo: fix lint error due to strict bool mode



details:   https://anonhg.NetBSD.org/src/rev/276e183f36b5
branches:  trunk
changeset: 1026297:276e183f36b5
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 16 21:38:29 2021 +0000

description:
echo: fix lint error due to strict bool mode

No functional change.

diffstat:

 bin/echo/echo.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 43b2bf9cea0c -r 276e183f36b5 bin/echo/echo.c
--- a/bin/echo/echo.c   Tue Nov 16 21:05:33 2021 +0000
+++ b/bin/echo/echo.c   Tue Nov 16 21:38:29 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: echo.c,v 1.22 2021/11/10 17:35:45 kre Exp $        */
+/* $NetBSD: echo.c,v 1.23 2021/11/16 21:38:29 rillig Exp $     */
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)echo.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: echo.c,v 1.22 2021/11/10 17:35:45 kre Exp $");
+__RCSID("$NetBSD: echo.c,v 1.23 2021/11/16 21:38:29 rillig Exp $");
 #endif
 
 #include <err.h>
@@ -68,8 +68,8 @@
        }
        if (!nflag)
                (void)putchar('\n');
-       fflush(stdout);
-       if (ferror(stdout))
+       (void)fflush(stdout);
+       if (ferror(stdout) != 0)
                err(1, "write error");
        return 0;
 }



Home | Main Index | Thread Index | Old Index