From 4cb875290859eedf046a50df867634507db7d6ec Mon Sep 17 00:00:00 2001 From: rillig Date: Fri, 10 Sep 2021 22:11:03 +0000 Subject: [PATCH] bin: remove unnecessary lint comment CONSTCOND Since 2021-01-31, lint no longer warns about 'do ... while (0)'. No functional change. --- 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(-) diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 0fac98bed76c..7b2d5fb6372a 100644 --- a/bin/dd/misc.c +++ b/bin/dd/misc.c @@ -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 @@ dd_write_msg(const char *fmt, int enable) 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 --git a/bin/ps/ps.h b/bin/ps/ps.h index 7d8ddb835d11..b6c284459501 100644 --- a/bin/ps/ps.h +++ b/bin/ps/ps.h @@ -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 @@ typedef struct var { if ((vent)->var->flag & LWP) \ pi->li = kl; \ ((vent)->var->oproc)(pi, (vent), (mode)); \ - } while (/*CONSTCOND*/ 0) + } while (0) #include "extern.h" diff --git a/bin/rm/rm.c b/bin/rm/rm.c index c1d2e8dd50e8..a89ca151a351 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\ #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 @@ rm_overwrite(char *file, struct stat *sbp) 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 @@ rm_overwrite(char *file, struct stat *sbp) goto err; \ } \ sync(); /* another poke at hidden caches */ \ -} while (/* CONSTCOND */ 0) +} while (0) /* * DSS sanitization matrix "clear" for magnetic disks: diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 7e1782a07e49..2ea854e45252 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -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 @@ STATIC void rmescapes_nl(char *); #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 --git a/bin/sh/shell.h b/bin/sh/shell.h index 318d56e3a166..d631c1d7c406 100644 --- a/bin/sh/shell.h +++ b/bin/sh/shell.h @@ -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 @@ extern int ShNest; #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)<