usr.bin: remove unnecessary CONSTCOND, lint no longer needs it
Since 2021-01-31, lint no longer requires a CONSTCOND comment in a do-while-0 statement since this is a common code pattern, especially in statement-like macros.
This commit is contained in:
parent
9349f183d2
commit
1d6b489c6e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cdplay.c,v 1.50 2020/10/18 21:58:32 rillig Exp $ */
|
||||
/* $NetBSD: cdplay.c,v 1.51 2021/11/27 22:16:41 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Andrew Doran.
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: cdplay.c,v 1.50 2020/10/18 21:58:32 rillig Exp $");
|
||||
__RCSID("$NetBSD: cdplay.c,v 1.51 2021/11/27 22:16:41 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -130,7 +130,7 @@ static struct cmdtab {
|
|||
fd = -1; \
|
||||
} else \
|
||||
warn("ioctl(" #ctl ")");\
|
||||
} while (/* CONSTCOND */ 0)
|
||||
} while (0)
|
||||
|
||||
#define CDDA_SIZE 2352
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fdformat.c,v 1.17 2016/09/05 00:40:28 sevan Exp $ */
|
||||
/* $NetBSD: fdformat.c,v 1.18 2021/11/27 22:16:41 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: fdformat.c,v 1.17 2016/09/05 00:40:28 sevan Exp $");
|
||||
__RCSID("$NetBSD: fdformat.c,v 1.18 2021/11/27 22:16:41 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -135,7 +135,7 @@ usage(void)
|
|||
# which, optarg); \
|
||||
parms.which = tmplong; \
|
||||
parmmask |= MASK_##maskn; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
#define getparm(structname, maskname) \
|
||||
do { \
|
||||
|
@ -144,7 +144,7 @@ usage(void)
|
|||
" missing for type `%s'", optarg); \
|
||||
parms.structname = tmplong; \
|
||||
parmmask |= MASK_ ## maskname; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
|
||||
#define copyparm(which, mask) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sig.c,v 1.3 2012/06/12 19:03:26 christos Exp $ */
|
||||
/* $NetBSD: sig.c,v 1.4 2021/11/27 22:16:41 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: sig.c,v 1.3 2012/06/12 19:03:26 christos Exp $");
|
||||
__RCSID("$NetBSD: sig.c,v 1.4 2021/11/27 22:16:41 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -63,7 +63,7 @@ static struct {
|
|||
#define SIGQUEUE_INIT(p) do {\
|
||||
(p)->qe_first = NULL;\
|
||||
(p)->qe_last = &((p)->qe_first);\
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* The routines alloc_entry() and free_entry() manage the queue
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: midiplay.c,v 1.33 2019/02/01 08:37:21 mrg Exp $ */
|
||||
/* $NetBSD: midiplay.c,v 1.34 2021/11/27 22:16:41 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: midiplay.c,v 1.33 2019/02/01 08:37:21 mrg Exp $");
|
||||
__RCSID("$NetBSD: midiplay.c,v 1.34 2021/11/27 22:16:41 rillig Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -842,7 +842,7 @@ main(int argc, char **argv)
|
|||
struct track *_t = t[i].indirect; \
|
||||
t[i].indirect = t[j].indirect; \
|
||||
t[j].indirect = _t; \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
Heapify(struct track *t, int ntrks, int node)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: su_pam.c,v 1.22 2021/09/10 21:52:18 rillig Exp $ */
|
||||
/* $NetBSD: su_pam.c,v 1.23 2021/11/27 22:16:42 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.22 2021/09/10 21:52:18 rillig Exp $");
|
||||
__RCSID("$NetBSD: su_pam.c,v 1.23 2021/11/27 22:16:42 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -293,12 +293,12 @@ main(int argc, char **argv)
|
|||
#define ERRX_PAM_END(args) do { \
|
||||
(void)pam_end(pamh, pam_err); \
|
||||
errx args; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
#define ERR_PAM_END(args) do { \
|
||||
(void)pam_end(pamh, pam_err); \
|
||||
err args; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
/* force the usage of specified class */
|
||||
if (class) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: drvstats.c,v 1.13 2019/06/30 19:57:24 he Exp $ */
|
||||
/* $NetBSD: drvstats.c,v 1.14 2021/11/27 22:16:42 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 John M. Vinopal
|
||||
|
@ -64,7 +64,7 @@ char **dr_name;
|
|||
#define timerset(tvp, uvp) do { \
|
||||
((uvp)->tv_sec = (tvp)->tv_sec); \
|
||||
((uvp)->tv_usec = (tvp)->tv_usec); \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Take the delta between the present values and the last recorded
|
||||
|
@ -81,7 +81,7 @@ drvswap(void)
|
|||
tmp = cur.fld; \
|
||||
cur.fld -= last.fld; \
|
||||
last.fld = tmp; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
#define DELTA(x) do { \
|
||||
timerclear(&tmp_timer); \
|
||||
|
@ -89,7 +89,7 @@ drvswap(void)
|
|||
timersub(&tmp_timer, &(last.x), &(cur.x)); \
|
||||
timerclear(&(last.x)); \
|
||||
timerset(&tmp_timer, &(last.x)); \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
for (i = 0; i < ndrive; i++) {
|
||||
struct timeval tmp_timer;
|
||||
|
@ -194,7 +194,7 @@ drvreadstats(void)
|
|||
#define COPYT(x,k,l) do { \
|
||||
cur.x[k].tv_sec = drives[l].x##_sec; \
|
||||
cur.x[k].tv_usec = drives[l].x##_usec; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
for (i = 0, j = 0; i < ndrive && j < count; i++) {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmstat.c,v 1.247 2021/08/22 22:24:12 rillig Exp $ */
|
||||
/* $NetBSD: vmstat.c,v 1.248 2021/11/27 22:16:42 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2001, 2007, 2019, 2020
|
||||
|
@ -71,7 +71,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1986, 1991, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.247 2021/08/22 22:24:12 rillig Exp $");
|
||||
__RCSID("$NetBSD: vmstat.c,v 1.248 2021/11/27 22:16:42 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -285,7 +285,7 @@ kvm_t *kd;
|
|||
(val)) - (width); \
|
||||
if ((ovflw) < 0) \
|
||||
(ovflw) = 0; \
|
||||
} while (/* CONSTCOND */0)
|
||||
} while (0)
|
||||
|
||||
void cpustats(int *);
|
||||
void cpucounters(struct cpu_counter *);
|
||||
|
@ -1372,7 +1372,7 @@ doevcnt(int verbose, int type)
|
|||
(int)total_max, counttotal,
|
||||
(int)rate_max, counttotal / uptime);
|
||||
return;
|
||||
} while (/*CONSTCOND*/ 0);
|
||||
} while (0);
|
||||
|
||||
if (type == EVCNT_TYPE_ANY)
|
||||
(void)printf("%-34s %16s %8s %s\n", "event", "total", "rate",
|
||||
|
|
Loading…
Reference in New Issue