Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/606b91ad7667
branches:  trunk
changeset: 1023487:606b91ad7667
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 10 21:52:17 2021 +0000

description:
usr.bin: remove unnecessary lint comment CONSTCOND

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

No functional change.

diffstat:

 usr.bin/col/col.c           |   6 +++---
 usr.bin/config/scan.l       |   6 +++---
 usr.bin/ftp/ftp_var.h       |   4 ++--
 usr.bin/gzip/unlz.c         |   6 +++---
 usr.bin/login/login_pam.c   |   8 ++++----
 usr.bin/mail/thread.c       |   6 +++---
 usr.bin/netstat/inet6.c     |   6 +++---
 usr.bin/passwd/pam_passwd.c |   6 +++---
 usr.bin/su/su_pam.c         |   6 +++---
 usr.bin/tip/tip.h           |  10 +++++-----
 usr.bin/unzip/unzip.c       |   6 +++---
 11 files changed, 35 insertions(+), 35 deletions(-)

diffs (295 lines):

diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/col/col.c
--- a/usr.bin/col/col.c Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/col/col.c Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: col.c,v 1.19 2020/11/01 22:27:15 christos Exp $        */
+/*     $NetBSD: col.c,v 1.20 2021/09/10 21:52:17 rillig Exp $  */
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -47,7 +47,7 @@
 ;
 
 #endif
-__RCSID("$NetBSD: col.c,v 1.19 2020/11/01 22:27:15 christos Exp $");
+__RCSID("$NetBSD: col.c,v 1.20 2021/09/10 21:52:17 rillig Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -123,7 +123,7 @@
        do {                                    \
                if (putwchar(ch) == WEOF)       \
                        errx(EXIT_FAILURE, "write error");      \
-       } while (/*CONSTCOND*/0)
+       } while (0)
 
 int
 main(int argc, char **argv)
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/config/scan.l
--- a/usr.bin/config/scan.l     Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/config/scan.l     Fri Sep 10 21:52:17 2021 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: scan.l,v 1.33 2020/07/26 22:25:47 uwe Exp $    */
+/*     $NetBSD: scan.l,v 1.34 2021/09/10 21:52:17 rillig Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: scan.l,v 1.33 2020/07/26 22:25:47 uwe Exp $");
+__RCSID("$NetBSD: scan.l,v 1.34 2021/09/10 21:52:17 rillig Exp $");
 
 #include <sys/param.h>
 #include <errno.h>
@@ -90,7 +90,7 @@
                printf("%s%s [%d,%d,%d] %#" PRIx64 "\n", x, # s, \
                    IDS_PARENT_DISABLED, IDS_ISMATCH(st), getcurifdef(), \
                    ifdefstate); \
-       } while (/*CONSTCOND*/0)
+       } while (0)
 #else
 # define IDS_PRINT(s, st, x) ((void)0)
 #endif
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/ftp/ftp_var.h
--- a/usr.bin/ftp/ftp_var.h     Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/ftp/ftp_var.h     Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp_var.h,v 1.85 2017/11/20 21:11:36 kre Exp $ */
+/*     $NetBSD: ftp_var.h,v 1.86 2021/09/10 21:52:17 rillig Exp $      */
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -341,7 +341,7 @@
 #define DPRINTF(...)   (void)0
 #define DWARN(...)     (void)0
 #else
-#define DWFTP(a)       do a; while (/*CONSTCOND*/0)
+#define DWFTP(a)       do a; while (0)
 #define DPRINTF(...)   DWFTP(if (ftp_debug) (void)fprintf(ttyout, __VA_ARGS__))
 #define DWARN(...)     DWFTP(if (ftp_debug) warn(__VA_ARGS__))
 #endif
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/gzip/unlz.c
--- a/usr.bin/gzip/unlz.c       Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/gzip/unlz.c       Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unlz.c,v 1.6 2018/11/11 01:42:36 christos Exp $        */
+/*     $NetBSD: unlz.c,v 1.7 2021/09/10 21:52:17 rillig Exp $  */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -393,7 +393,7 @@
        size_t l = __arraycount(a[0]); \
        for (size_t i = 0; i < __arraycount(a); i++) \
                lz_bm_init(a[i], l); \
-} while (/*CONSTCOND*/0)
+} while (0)
 
 #define LZ_MODEL_INIT(a) do { \
        a.choice1 = BIT_MODEL_INIT; \
@@ -401,7 +401,7 @@
        LZ_BM_INIT2(a.bm_low); \
        LZ_BM_INIT2(a.bm_mid); \
        LZ_BM_INIT(a.bm_high); \
-} while (/*CONSTCOND*/0)
+} while (0)
                
 static bool
 lz_decode_member(struct lz_decoder *lz)
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/login/login_pam.c
--- a/usr.bin/login/login_pam.c Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/login/login_pam.c Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: login_pam.c,v 1.26 2020/02/08 13:44:35 kamil Exp $       */
+/*     $NetBSD: login_pam.c,v 1.27 2021/09/10 21:52:17 rillig Exp $       */
 
 /*-
  * Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)login.c    8.4 (Berkeley) 4/2/94";
 #endif
-__RCSID("$NetBSD: login_pam.c,v 1.26 2020/02/08 13:44:35 kamil Exp $");
+__RCSID("$NetBSD: login_pam.c,v 1.27 2021/09/10 21:52:17 rillig Exp $");
 #endif /* not lint */
 
 /*
@@ -258,7 +258,7 @@
        warnx("%s: %s", msg, pam_strerror(pamh, pam_err));              \
        pam_end(pamh, pam_err);                                         \
        sleepexit(EXIT_FAILURE);                                        \
-} while (/*CONSTCOND*/0)
+} while (0)
 
                pam_err = pam_start("login", username, &pamc, &pamh);
                if (pam_err != PAM_SUCCESS) {
@@ -274,7 +274,7 @@
        pam_err = pam_set_item(pamh, (item), (var));                    \
        if (pam_err != PAM_SUCCESS)                                     \
                PAM_END("pam_set_item(" # item ")");                    \
-} while (/*CONSTCOND*/0)
+} while (0)
 
                /* 
                 * Fill hostname tty, and nested user
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/mail/thread.c
--- a/usr.bin/mail/thread.c     Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/mail/thread.c     Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: thread.c,v 1.10 2012/10/21 22:18:16 christos Exp $     */
+/*     $NetBSD: thread.c,v 1.11 2021/09/10 21:52:18 rillig Exp $       */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #ifndef __lint__
-__RCSID("$NetBSD: thread.c,v 1.10 2012/10/21 22:18:16 christos Exp $");
+__RCSID("$NetBSD: thread.c,v 1.11 2021/09/10 21:52:18 rillig Exp $");
 #endif /* not __lint__ */
 
 #include <assert.h>
@@ -453,7 +453,7 @@
 # define FIX_LINK(p)   do {\
        if (p)\
                p = nmessage + (p - message);\
-  } while (/*CONSTCOND*/0)
+  } while (0)
 
        FIX_LINK(current_thread.t_head);
        for (i = 0; i < omsgCount; i++) {
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/netstat/inet6.c
--- a/usr.bin/netstat/inet6.c   Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/netstat/inet6.c   Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet6.c,v 1.77 2020/08/28 07:23:48 ozaki-r Exp $       */
+/*     $NetBSD: inet6.c,v 1.78 2021/09/10 21:52:18 rillig Exp $        */
 /*     BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp   */
 
 /*
@@ -64,7 +64,7 @@
 #if 0
 static char sccsid[] = "@(#)inet.c     8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: inet6.c,v 1.77 2020/08/28 07:23:48 ozaki-r Exp $");
+__RCSID("$NetBSD: inet6.c,v 1.78 2021/09/10 21:52:18 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -747,7 +747,7 @@
                        printf("\t\t%llu addresses scope=%x\n",\
                               (unsigned long long)ip6stat[s], i);\
                }\
-       } while(/*CONSTCOND*/0);
+       } while(0);
 
        p(IP6_STAT_SOURCES_NONE,
          "\t%llu failure%s of source address selection\n");
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/passwd/pam_passwd.c
--- a/usr.bin/passwd/pam_passwd.c       Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/passwd/pam_passwd.c       Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pam_passwd.c,v 1.6 2010/03/09 16:14:08 joerg Exp $     */
+/*     $NetBSD: pam_passwd.c,v 1.7 2021/09/10 21:52:18 rillig Exp $    */
 
 /*-
  * Copyright (c) 2002 Networks Associates Technologies, Inc.
@@ -38,7 +38,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/usr.bin/passwd/passwd.c,v 1.23 2003/04/18 21:27:09 nectar Exp $");
 #else
-__RCSID("$NetBSD: pam_passwd.c,v 1.6 2010/03/09 16:14:08 joerg Exp $");
+__RCSID("$NetBSD: pam_passwd.c,v 1.7 2021/09/10 21:52:18 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -67,7 +67,7 @@
                warnx("%s: %s", (msg), pam_strerror(pamh, pam_err));    \
                goto end;                                               \
        }                                                               \
-} while (/*CONSTCOND*/0)
+} while (0)
 
 void
 pwpam_process(const char *username, int argc, char **argv)
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/su/su_pam.c
--- a/usr.bin/su/su_pam.c       Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/su/su_pam.c       Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: su_pam.c,v 1.21 2018/02/26 00:05:05 htodd Exp $        */
+/*     $NetBSD: su_pam.c,v 1.22 2021/09/10 21:52:18 rillig Exp $       */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)su.c       8.3 (Berkeley) 4/2/94";*/
 #else
-__RCSID("$NetBSD: su_pam.c,v 1.21 2018/02/26 00:05:05 htodd Exp $");
+__RCSID("$NetBSD: su_pam.c,v 1.22 2021/09/10 21:52:18 rillig Exp $");
 #endif
 #endif /* not lint */
 
@@ -220,7 +220,7 @@
        /*
         * PAM initialization
         */
-#define PAM_END(msg) do { func = msg; goto done;} /* NOTREACHED */ while (/*CONSTCOND*/0)
+#define PAM_END(msg) do { func = msg; goto done;} /* NOTREACHED */ while (0)
 
        if ((pam_err = pam_start("su", user, &pamc, &pamh)) != PAM_SUCCESS) {
                if (pamh != NULL)
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/tip/tip.h
--- a/usr.bin/tip/tip.h Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/tip/tip.h Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tip.h,v 1.34 2020/04/23 00:35:14 joerg Exp $   */
+/*     $NetBSD: tip.h,v 1.35 2021/09/10 21:52:18 rillig Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -155,10 +155,10 @@
 #define        character(v)    ((char)(intptr_t)(v))
 #define        address(v)      ((long *)(intptr_t)(v))
 
-#define        setnumber(v,n)          do { (v) = (char *)(intptr_t)(n); } while (/*CONSTCOND*/0)
-#define        setboolean(v,n)         do { (v) = (char *)(intptr_t)(n); } while (/*CONSTCOND*/0)
-#define        setcharacter(v,n)       do { (v) = (char *)(intptr_t)(n); } while (/*CONSTCOND*/0)
-#define        setaddress(v,n)         do { (v) = (char *)(intptr_t)(n); } while (/*CONSTCOND*/0)
+#define        setnumber(v,n)          do { (v) = (char *)(intptr_t)(n); } while (0)
+#define        setboolean(v,n)         do { (v) = (char *)(intptr_t)(n); } while (0)
+#define        setcharacter(v,n)       do { (v) = (char *)(intptr_t)(n); } while (0)
+#define        setaddress(v,n)         do { (v) = (char *)(intptr_t)(n); } while (0)
 
 /*
  * Escape command table definitions --
diff -r 773fb4aff3d1 -r 606b91ad7667 usr.bin/unzip/unzip.c
--- a/usr.bin/unzip/unzip.c     Fri Sep 10 21:22:05 2021 +0000
+++ b/usr.bin/unzip/unzip.c     Fri Sep 10 21:52:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.27 2021/02/18 18:06:02 christos Exp $ */
+/* $NetBSD: unzip.c,v 1.28 2021/09/10 21:52:18 rillig Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 Joerg Sonnenberger <joerg%NetBSD.org@localhost>
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: unzip.c,v 1.27 2021/02/18 18:06:02 christos Exp $");
+__RCSID("$NetBSD: unzip.c,v 1.28 2021/09/10 21:52:18 rillig Exp $");
 
 #ifdef __GLIBC__
 #define _GNU_SOURCE
@@ -97,7 +97,7 @@
                int acret = (call);                             \
                if (acret != ARCHIVE_OK)                        \
                        errorx("%s", archive_error_string(a));  \
-       } while (/*CONSTCOND*/0)
+       } while (0)
 
 /*
  * Indicates that last info() did not end with EOL.  This helps error() et



Home | Main Index | Thread Index | Old Index