Source-Changes-HG archive

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

[src/trunk]: src/bin bin: remove unnecessary lint comment CONSTCOND



details:   https://anonhg.NetBSD.org/src/rev/1bf2667490c8
branches:  trunk
changeset: 1023488:1bf2667490c8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 10 22:11:03 2021 +0000

description:
bin: remove unnecessary lint comment CONSTCOND

Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.

diffstat:

 bin/dd/misc.c   |   8 ++++----
 bin/ps/ps.h     |   4 ++--
 bin/rm/rm.c     |   8 ++++----
 bin/sh/expand.c |   6 +++---
 bin/sh/shell.h  |  18 +++++++++---------
 bin/sh/show.c   |   6 +++---
 6 files changed, 25 insertions(+), 25 deletions(-)

diffs (205 lines):

diff -r 606b91ad7667 -r 1bf2667490c8 bin/dd/misc.c
--- a/bin/dd/misc.c     Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/dd/misc.c     Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.23 2011/11/07 22:24:23 jym Exp $    */
+/*     $NetBSD: misc.c,v 1.24 2021/09/10 22:11:03 rillig Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)misc.c     8.3 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: misc.c,v 1.23 2011/11/07 22:24:23 jym Exp $");
+__RCSID("$NetBSD: misc.c,v 1.24 2021/09/10 22:11:03 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -204,9 +204,9 @@
                mS = 1;
 
 #define ADDC(c) do { if (enable != 0) buffer_write(&c, 1, 0); } \
-       while (/*CONSTCOND*/0)
+       while (0)
 #define ADDS(p) do { if (enable != 0) buffer_write(p, strlen(p), 0); } \
-       while (/*CONSTCOND*/0)
+       while (0)
 
        for (ptr = fmt; *ptr; ptr++) {
                if (*ptr != '%') {
diff -r 606b91ad7667 -r 1bf2667490c8 bin/ps/ps.h
--- a/bin/ps/ps.h       Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/ps/ps.h       Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ps.h,v 1.29 2016/12/02 21:59:03 christos Exp $ */
+/*     $NetBSD: ps.h,v 1.30 2021/09/10 22:11:03 rillig Exp $   */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -99,6 +99,6 @@
        if ((vent)->var->flag & LWP)                    \
            pi->li = kl;                                \
        ((vent)->var->oproc)(pi, (vent), (mode));       \
-       } while (/*CONSTCOND*/ 0)
+       } while (0)
 
 #include "extern.h"
diff -r 606b91ad7667 -r 1bf2667490c8 bin/rm/rm.c
--- a/bin/rm/rm.c       Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/rm/rm.c       Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rm.c,v 1.53 2013/04/26 18:43:22 christos Exp $ */
+/* $NetBSD: rm.c,v 1.54 2021/09/10 22:11:03 rillig Exp $ */
 
 /*-
  * Copyright (c) 1990, 1993, 1994, 2003
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rm.c       8.8 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: rm.c,v 1.53 2013/04/26 18:43:22 christos Exp $");
+__RCSID("$NetBSD: rm.c,v 1.54 2021/09/10 22:11:03 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -437,7 +437,7 @@
                        goto err;                                       \
        }                                                               \
        sync();         /* another poke at hidden caches */             \
-} while (/* CONSTCOND */ 0)
+} while (0)
 
 #define READ_PASS(byte) do {                                           \
        off_t len;                                                      \
@@ -457,7 +457,7 @@
                        goto err;                                       \
        }                                                               \
        sync();         /* another poke at hidden caches */             \
-} while (/* CONSTCOND */ 0)
+} while (0)
 
        /*
         * DSS sanitization matrix "clear" for magnetic disks: 
diff -r 606b91ad7667 -r 1bf2667490c8 bin/sh/expand.c
--- a/bin/sh/expand.c   Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/sh/expand.c   Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expand.c,v 1.138 2020/08/01 17:56:56 kre Exp $ */
+/*     $NetBSD: expand.c,v 1.139 2021/09/10 22:11:03 rillig Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c   8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.138 2020/08/01 17:56:56 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.139 2021/09/10 22:11:03 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -126,7 +126,7 @@
 #ifdef DEBUG
 #define        NULLTERM_4_TRACE(p)     STACKSTRNUL(p)
 #else
-#define        NULLTERM_4_TRACE(p)     do { /* nothing */ } while (/*CONSTCOND*/0)
+#define        NULLTERM_4_TRACE(p)     do { /* nothing */ } while (0)
 #endif
 
 #define        IS_BORING(_ch)                                          \
diff -r 606b91ad7667 -r 1bf2667490c8 bin/sh/shell.h
--- a/bin/sh/shell.h    Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/sh/shell.h    Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: shell.h,v 1.29 2019/01/22 13:48:28 kre Exp $   */
+/*     $NetBSD: shell.h,v 1.30 2021/09/10 22:11:03 rillig Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -110,42 +110,42 @@
 #define CTRACE(when, param)    do {                                    \
                                    if ((DFlags & (when)) != 0)         \
                                        trace param;                    \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define CCTRACE(when,cond,param) do {                                  \
                                    if ((cond) && (DFlags & (when)) != 0) \
                                        trace param;                    \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define CTRACEV(when, param)   do {                                    \
                                    if ((DFlags & (when)) != 0)         \
                                        tracev param;                   \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define XTRACE(when, param, xtra) do {                                 \
                                    if ((DFlags & (when)) != 0) {       \
                                        trace param;                    \
                                        xtra;                           \
                                    }                                   \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define VTRACE(when, param)    do {                                    \
                                    if ((DFlags &                       \
                                        (when)<<DBG_VBOSE_SHIFT) != 0)  \
                                            trace param;                \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define CVTRACE(when,cond,param) do {                                  \
                                    if ((cond) && (DFlags &             \
                                        (when)<<DBG_VBOSE_SHIFT) != 0)  \
                                            trace param;                \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define VTRACEV(when, param)   do {                                    \
                                    if ((DFlags &                       \
                                        (when)<<DBG_VBOSE_SHIFT) != 0)  \
                                            tracev param;               \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define VXTRACE(when, param, xtra) do {                                        \
                                    if ((DFlags &                       \
@@ -153,7 +153,7 @@
                                            trace param;                \
                                            xtra;                       \
                                    }                                   \
-                               } while (/*CONSTCOND*/ 0)
+                               } while (0)
 
 #define SHELL_FORKED() ShNest++
 #define VFORK_BLOCK    { const int _ShNest = ShNest;
diff -r 606b91ad7667 -r 1bf2667490c8 bin/sh/show.c
--- a/bin/sh/show.c     Fri Sep 10 21:52:17 2021 +0000
+++ b/bin/sh/show.c     Fri Sep 10 22:11:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: show.c,v 1.53 2019/02/14 13:27:59 kre Exp $    */
+/*     $NetBSD: show.c,v 1.54 2021/09/10 22:11:03 rillig Exp $ */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)show.c     8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: show.c,v 1.53 2019/02/14 13:27:59 kre Exp $");
+__RCSID("$NetBSD: show.c,v 1.54 2021/09/10 22:11:03 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -185,7 +185,7 @@
                if (tracedata.f != NULL)                \
                        free(tracedata.f);              \
                tracedata.f = v;                        \
-       } while (/*CONSTCOND*/ 0)
+       } while (0)
 
        replace(tracefile, s);
 



Home | Main Index | Thread Index | Old Index