diff --git a/usr.bin/col/col.c b/usr.bin/col/col.c index b329e2440cdd..d11b650598d4 100644 --- a/usr.bin/col/col.c +++ b/usr.bin/col/col.c @@ -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 @@ __FBSDID("$FreeBSD: head/usr.bin/col/col.c 366577 2020-10-09 15:27:37Z markj $") ; #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 @@ -123,7 +123,7 @@ static int pass_unknown_seqs; /* pass unknown control sequences */ do { \ if (putwchar(ch) == WEOF) \ errx(EXIT_FAILURE, "write error"); \ - } while (/*CONSTCOND*/0) + } while (0) int main(int argc, char **argv) diff --git a/usr.bin/config/scan.l b/usr.bin/config/scan.l index b45c457ef915..994224cc205b 100644 --- a/usr.bin/config/scan.l +++ b/usr.bin/config/scan.l @@ -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 -__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 #include @@ -90,7 +90,7 @@ int ifdefshift = -1; 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 --git a/usr.bin/ftp/ftp_var.h b/usr.bin/ftp/ftp_var.h index 4d4224ff8a2a..3f03581afc87 100644 --- a/usr.bin/ftp/ftp_var.h +++ b/usr.bin/ftp/ftp_var.h @@ -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 @@ extern struct option optiontab[]; #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 --git a/usr.bin/gzip/unlz.c b/usr.bin/gzip/unlz.c index 2cefac3d22f4..e3d5623b59d8 100644 --- a/usr.bin/gzip/unlz.c +++ b/usr.bin/gzip/unlz.c @@ -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 @@ lz_bm_init(int *a, size_t l) 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_init(int *a, size_t l) 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 --git a/usr.bin/login/login_pam.c b/usr.bin/login/login_pam.c index 7d877ebeb1c0..e05856895577 100644 --- a/usr.bin/login/login_pam.c +++ b/usr.bin/login/login_pam.c @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1988, 1991, 1993, 1994\ #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 @@ main(int argc, char *argv[]) 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 @@ main(int argc, char *argv[]) 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 --git a/usr.bin/mail/thread.c b/usr.bin/mail/thread.c index 7e0c63d463a5..e4ae729a6046 100644 --- a/usr.bin/mail/thread.c +++ b/usr.bin/mail/thread.c @@ -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 #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 @@ -453,7 +453,7 @@ thread_fix_old_links(struct message *nmessage, struct message *message, int omsg # 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 --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index d81743bd1d8e..b518d8386ec4 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -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 @@ ip6_stats(u_long off, const char *name) 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 --git a/usr.bin/passwd/pam_passwd.c b/usr.bin/passwd/pam_passwd.c index 57cba406ddc3..ff240a994e3e 100644 --- a/usr.bin/passwd/pam_passwd.c +++ b/usr.bin/passwd/pam_passwd.c @@ -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 @@ -67,7 +67,7 @@ do { \ 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 --git a/usr.bin/su/su_pam.c b/usr.bin/su/su_pam.c index da69e67cdccc..8e6bfeb886fe 100644 --- a/usr.bin/su/su_pam.c +++ b/usr.bin/su/su_pam.c @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1988\ #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 @@ main(int argc, char **argv) /* * 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 --git a/usr.bin/tip/tip.h b/usr.bin/tip/tip.h index 146d5324d0de..038467099343 100644 --- a/usr.bin/tip/tip.h +++ b/usr.bin/tip/tip.h @@ -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 @@ typedef #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 --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c index d9740139c858..0d8e8f872fad 100644 --- a/usr.bin/unzip/unzip.c +++ b/usr.bin/unzip/unzip.c @@ -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 @@ -37,7 +37,7 @@ */ #include -__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 @@ static int tty; 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