bin: remove unnecessary lint comment CONSTCOND

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

No functional change.
This commit is contained in:
rillig 2021-09-10 22:11:03 +00:00
parent 133e932a29
commit 4cb8752908
6 changed files with 25 additions and 25 deletions

View File

@ -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 * Copyright (c) 1991, 1993, 1994
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94"; static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -204,9 +204,9 @@ dd_write_msg(const char *fmt, int enable)
mS = 1; mS = 1;
#define ADDC(c) do { if (enable != 0) buffer_write(&c, 1, 0); } \ #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); } \ #define ADDS(p) do { if (enable != 0) buffer_write(p, strlen(p), 0); } \
while (/*CONSTCOND*/0) while (0)
for (ptr = fmt; *ptr; ptr++) { for (ptr = fmt; *ptr; ptr++) {
if (*ptr != '%') { if (*ptr != '%') {

View File

@ -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 * Copyright (c) 1990, 1993
@ -99,6 +99,6 @@ typedef struct var {
if ((vent)->var->flag & LWP) \ if ((vent)->var->flag & LWP) \
pi->li = kl; \ pi->li = kl; \
((vent)->var->oproc)(pi, (vent), (mode)); \ ((vent)->var->oproc)(pi, (vent), (mode)); \
} while (/*CONSTCOND*/ 0) } while (0)
#include "extern.h" #include "extern.h"

View File

@ -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 * Copyright (c) 1990, 1993, 1994, 2003
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\
#if 0 #if 0
static char sccsid[] = "@(#)rm.c 8.8 (Berkeley) 4/27/95"; static char sccsid[] = "@(#)rm.c 8.8 (Berkeley) 4/27/95";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -437,7 +437,7 @@ rm_overwrite(char *file, struct stat *sbp)
goto err; \ goto err; \
} \ } \
sync(); /* another poke at hidden caches */ \ sync(); /* another poke at hidden caches */ \
} while (/* CONSTCOND */ 0) } while (0)
#define READ_PASS(byte) do { \ #define READ_PASS(byte) do { \
off_t len; \ off_t len; \
@ -457,7 +457,7 @@ rm_overwrite(char *file, struct stat *sbp)
goto err; \ goto err; \
} \ } \
sync(); /* another poke at hidden caches */ \ sync(); /* another poke at hidden caches */ \
} while (/* CONSTCOND */ 0) } while (0)
/* /*
* DSS sanitization matrix "clear" for magnetic disks: * DSS sanitization matrix "clear" for magnetic disks:

View File

@ -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 * Copyright (c) 1991, 1993
@ -37,7 +37,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -126,7 +126,7 @@ STATIC void rmescapes_nl(char *);
#ifdef DEBUG #ifdef DEBUG
#define NULLTERM_4_TRACE(p) STACKSTRNUL(p) #define NULLTERM_4_TRACE(p) STACKSTRNUL(p)
#else #else
#define NULLTERM_4_TRACE(p) do { /* nothing */ } while (/*CONSTCOND*/0) #define NULLTERM_4_TRACE(p) do { /* nothing */ } while (0)
#endif #endif
#define IS_BORING(_ch) \ #define IS_BORING(_ch) \

View File

@ -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 * Copyright (c) 1991, 1993
@ -110,42 +110,42 @@ extern int ShNest;
#define CTRACE(when, param) do { \ #define CTRACE(when, param) do { \
if ((DFlags & (when)) != 0) \ if ((DFlags & (when)) != 0) \
trace param; \ trace param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define CCTRACE(when,cond,param) do { \ #define CCTRACE(when,cond,param) do { \
if ((cond) && (DFlags & (when)) != 0) \ if ((cond) && (DFlags & (when)) != 0) \
trace param; \ trace param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define CTRACEV(when, param) do { \ #define CTRACEV(when, param) do { \
if ((DFlags & (when)) != 0) \ if ((DFlags & (when)) != 0) \
tracev param; \ tracev param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define XTRACE(when, param, xtra) do { \ #define XTRACE(when, param, xtra) do { \
if ((DFlags & (when)) != 0) { \ if ((DFlags & (when)) != 0) { \
trace param; \ trace param; \
xtra; \ xtra; \
} \ } \
} while (/*CONSTCOND*/ 0) } while (0)
#define VTRACE(when, param) do { \ #define VTRACE(when, param) do { \
if ((DFlags & \ if ((DFlags & \
(when)<<DBG_VBOSE_SHIFT) != 0) \ (when)<<DBG_VBOSE_SHIFT) != 0) \
trace param; \ trace param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define CVTRACE(when,cond,param) do { \ #define CVTRACE(when,cond,param) do { \
if ((cond) && (DFlags & \ if ((cond) && (DFlags & \
(when)<<DBG_VBOSE_SHIFT) != 0) \ (when)<<DBG_VBOSE_SHIFT) != 0) \
trace param; \ trace param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define VTRACEV(when, param) do { \ #define VTRACEV(when, param) do { \
if ((DFlags & \ if ((DFlags & \
(when)<<DBG_VBOSE_SHIFT) != 0) \ (when)<<DBG_VBOSE_SHIFT) != 0) \
tracev param; \ tracev param; \
} while (/*CONSTCOND*/ 0) } while (0)
#define VXTRACE(when, param, xtra) do { \ #define VXTRACE(when, param, xtra) do { \
if ((DFlags & \ if ((DFlags & \
@ -153,7 +153,7 @@ extern int ShNest;
trace param; \ trace param; \
xtra; \ xtra; \
} \ } \
} while (/*CONSTCOND*/ 0) } while (0)
#define SHELL_FORKED() ShNest++ #define SHELL_FORKED() ShNest++
#define VFORK_BLOCK { const int _ShNest = ShNest; #define VFORK_BLOCK { const int _ShNest = ShNest;

View File

@ -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 * Copyright (c) 1991, 1993
@ -39,7 +39,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95"; static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -185,7 +185,7 @@ opentrace(void)
if (tracedata.f != NULL) \ if (tracedata.f != NULL) \
free(tracedata.f); \ free(tracedata.f); \
tracedata.f = v; \ tracedata.f = v; \
} while (/*CONSTCOND*/ 0) } while (0)
replace(tracefile, s); replace(tracefile, s);