lib: remove CONSTCOND comment

Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.
bouyer-sunxi-drm
rillig 2022-04-19 20:32:14 +00:00
parent 86c56211f3
commit 388550b026
67 changed files with 259 additions and 259 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sdp.h,v 1.2 2009/07/25 17:04:51 plunky Exp $ */
/* $NetBSD: sdp.h,v 1.3 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -497,22 +497,22 @@ void sdp_print(uint32_t, uint8_t *, uint8_t const *);
#define SDP_GET8(b, cp) do { \
(b) = *(const uint8_t *)(cp); \
(cp) += sizeof(uint8_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_GET16(s, cp) do { \
(s) = be16dec(cp); \
(cp) += sizeof(uint16_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_GET32(l, cp) do { \
(l) = be32dec(cp); \
(cp) += sizeof(uint32_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_GET64(l, cp) do { \
(l) = be64dec(cp); \
(cp) += sizeof(uint64_t); \
} while (/* CONSTCOND */0)
} while (0)
#if BYTE_ORDER == LITTLE_ENDIAN
#define SDP_GET128(l, cp) do { \
@ -534,17 +534,17 @@ void sdp_print(uint32_t, uint8_t *, uint8_t const *);
(l)->b[1] = *t_cp++; \
(l)->b[0] = *t_cp++; \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_GET_UUID128(l, cp) do { \
memcpy(&((l)->b), (cp), 16); \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#elif BYTE_ORDER == BIG_ENDIAN
#define SDP_GET128(l, cp) do { \
memcpy(&((l)->b), (cp), 16); \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_GET_UUID128(l, cp) SDP_GET128(l, cp)
#else
@ -554,22 +554,22 @@ void sdp_print(uint32_t, uint8_t *, uint8_t const *);
#define SDP_PUT8(b, cp) do { \
*(uint8_t *)(cp) = (b); \
(cp) += sizeof(uint8_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_PUT16(s, cp) do { \
be16enc((cp), (s)); \
(cp) += sizeof(uint16_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_PUT32(s, cp) do { \
be32enc((cp), (s)); \
(cp) += sizeof(uint32_t); \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_PUT64(s, cp) do { \
be64enc((cp), (s)); \
(cp) += sizeof(uint64_t); \
} while (/* CONSTCOND */0)
} while (0)
#if BYTE_ORDER == LITTLE_ENDIAN
#define SDP_PUT128(l, cp) do { \
@ -591,17 +591,17 @@ void sdp_print(uint32_t, uint8_t *, uint8_t const *);
*t_cp++ = (l)->b[1]; \
*t_cp = (l)->b[0]; \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_PUT_UUID128(l, cp) do { \
memcpy((cp), &((l)->b), 16); \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#elif BYTE_ORDER == BIG_ENDIAN
#define SDP_PUT128(l, cp) do { \
memcpy((cp), &((l)->b), 16); \
(cp) += 16; \
} while (/* CONSTCOND */0)
} while (0)
#define SDP_PUT_UUID128(l, cp) SDP_PUT128(l, cp)
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: cdbw.c,v 1.7 2021/01/07 14:41:50 joerg Exp $ */
/* $NetBSD: cdbw.c,v 1.8 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c) 2009, 2010, 2015 The NetBSD Foundation, Inc.
* All rights reserved.
@ -36,7 +36,7 @@
#endif
#include <sys/cdefs.h>
__RCSID("$NetBSD: cdbw.c,v 1.7 2021/01/07 14:41:50 joerg Exp $");
__RCSID("$NetBSD: cdbw.c,v 1.8 2022/04/19 20:32:14 rillig Exp $");
#include "namespace.h"
@ -538,7 +538,7 @@ compute_size(uint32_t size)
return -1; \
cur_pos = 0; \
} \
} while (/* CONSTCOND */ 0)
} while (0)
static int
print_hash(struct cdbw *cdbw, struct state *state, int fd, const char *descr)

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_ctype_template.h,v 1.38 2020/06/02 01:30:31 joerg Exp $ */
/* $NetBSD: citrus_ctype_template.h,v 1.39 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@ -486,14 +486,14 @@ do { \
_FUNCNAME(unpack_state)(_CEI_TO_EI(_cei_), \
_pse_, _pspriv_); \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define _RESTART_END(_func_, _cei_, _pspriv_, _pse_) \
if (_pspriv_ != NULL) { \
_FUNCNAME(pack_state)(_CEI_TO_EI(_cei_), _pspriv_, \
_pse_); \
} \
} while (/*CONSTCOND*/0)
} while (0)
int
_FUNCNAME(ctype_getops)(_citrus_ctype_ops_rec_t *ops, size_t lenops,

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_hash.h,v 1.3 2004/01/02 21:49:35 itojun Exp $ */
/* $NetBSD: citrus_hash.h,v 1.4 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@ -39,7 +39,7 @@ do { \
int _ch_loop; \
for (_ch_loop = 0; _ch_loop < hashsize; _ch_loop++) \
LIST_INIT(&(head)->chh_table[_ch_loop]); \
} while (/*CONSTCOND*/0)
} while (0)
#define _CITRUS_HASH_REMOVE(elm, field) LIST_REMOVE(elm, field)
#define _CITRUS_HASH_INSERT(head, elm, field, hashval) \
LIST_INSERT_HEAD(&(head)->chh_table[hashval], elm, field)
@ -49,7 +49,7 @@ do { \
if (matchfunc((elm), key)==0) \
break; \
} \
} while (/*CONSTCOND*/0)
} while (0)
__BEGIN_DECLS
int _citrus_string_hash_func(const char *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_prop.c,v 1.5 2014/06/24 22:24:18 spz Exp $ */
/* $NetBSD: citrus_prop.c,v 1.6 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2006 Citrus Project,
@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_prop.c,v 1.5 2014/06/24 22:24:18 spz Exp $");
__RCSID("$NetBSD: citrus_prop.c,v 1.6 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@ -401,13 +401,13 @@ do { \
_DIAGASSERT(hint->cb._func_.func != NULL); \
errnum = (*hint->cb._func_.func)(context, \
hint->name, ostart.u._func_); \
} while (/*CONSTCOND*/0)
} while (0)
#define CALL1(_func_) \
do { \
_DIAGASSERT(hint->cb._func_.func != NULL); \
errnum = (*hint->cb._func_.func)(context, \
hint->name, ostart.u._func_, oend.u._func_);\
} while (/*CONSTCOND*/0)
} while (0)
switch (hint->type) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_gbk2k.c,v 1.8 2013/05/28 16:57:56 joerg Exp $ */
/* $NetBSD: citrus_gbk2k.c,v 1.9 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_gbk2k.c,v 1.8 2013/05/28 16:57:56 joerg Exp $");
__RCSID("$NetBSD: citrus_gbk2k.c,v 1.9 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@ -434,7 +434,7 @@ do { \
lenvar -= sizeof(#x)-1; \
p += sizeof(#x)-1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
memset((void *)ei, 0, sizeof(*ei));
ei->mb_cur_max = 4;
while (lenvar>0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_mskanji.c,v 1.14 2013/05/28 16:57:56 joerg Exp $ */
/* $NetBSD: citrus_mskanji.c,v 1.15 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@ -62,7 +62,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_mskanji.c,v 1.14 2013/05/28 16:57:56 joerg Exp $");
__RCSID("$NetBSD: citrus_mskanji.c,v 1.15 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@ -507,7 +507,7 @@ do { \
lenvar -= sizeof(#x)-1; \
p += sizeof(#x)-1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
memset((void *)ei, 0, sizeof(*ei));
while (lenvar > 0) {
switch (_bcs_toupper(*p)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_ues.c,v 1.4 2013/05/28 16:57:56 joerg Exp $ */
/* $NetBSD: citrus_ues.c,v 1.5 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2006 Citrus Project,
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_ues.c,v 1.4 2013/05/28 16:57:56 joerg Exp $");
__RCSID("$NetBSD: citrus_ues.c,v 1.5 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@ -439,7 +439,7 @@ do { \
lenvar -= sizeof(#x)-1; \
p += sizeof(#x)-1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
memset((void *)ei, 0, sizeof(*ei));
while (lenvar > 0) {
switch (_bcs_toupper(*p)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_utf1632.c,v 1.12 2012/02/12 13:51:29 wiz Exp $ */
/* $NetBSD: citrus_utf1632.c,v 1.13 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_utf1632.c,v 1.12 2012/02/12 13:51:29 wiz Exp $");
__RCSID("$NetBSD: citrus_utf1632.c,v 1.13 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@ -366,7 +366,7 @@ do { \
lenvar -= sizeof(#x)-1; \
p += sizeof(#x)-1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
const char *p;
p = var;
while (lenvar>0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_utf7.c,v 1.6 2013/05/28 16:57:56 joerg Exp $ */
/* $NetBSD: citrus_utf7.c,v 1.7 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2004, 2005 Citrus Project,
@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if defined(LIB_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_utf7.c,v 1.6 2013/05/28 16:57:56 joerg Exp $");
__RCSID("$NetBSD: citrus_utf7.c,v 1.7 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIB_SCCS and not lint */
#include <assert.h>
@ -544,7 +544,7 @@ _citrus_UTF7_encoding_module_init(_UTF7EncodingInfo * __restrict ei,
do { \
for (s = str; *s != '\0'; s++) \
ei->cell[*s & 0x7f] |= flag; \
} while (/*CONSTCOND*/0)
} while (0)
FILL(base64, (s - base64) + 1);
FILL(direct, EI_DIRECT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: citrus_zw.c,v 1.5 2013/05/28 16:57:56 joerg Exp $ */
/* $NetBSD: citrus_zw.c,v 1.6 2022/04/19 20:32:14 rillig Exp $ */
/*-
* Copyright (c)2004, 2006 Citrus Project,
@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#if defined(LIB_SCCS) && !defined(lint)
__RCSID("$NetBSD: citrus_zw.c,v 1.5 2013/05/28 16:57:56 joerg Exp $");
__RCSID("$NetBSD: citrus_zw.c,v 1.6 2022/04/19 20:32:14 rillig Exp $");
#endif /* LIB_SCCS and not lint */
#include <sys/types.h>
@ -166,7 +166,7 @@ do { \
if (len++ > MB_LEN_MAX || ch > 0x7F)\
goto ilseq; \
psenc->ch[psenc->chlen++] = ch; \
} while (/*CONSTCOND*/0)
} while (0)
loop:
switch (psenc->charset) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: btree.h,v 1.17 2013/09/04 13:03:22 ryoon Exp $ */
/* $NetBSD: btree.h,v 1.18 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -166,7 +166,7 @@ NBINTERNAL(uint32_t len) {
p += sizeof(pgno_t); \
*(uint8_t *)(void *)p = flags; \
p += sizeof(uint8_t); \
} while (/*CONSTCOND*/0)
} while (0)
/*
* For the recno internal pages, the item is a page number with the number of
@ -190,7 +190,7 @@ typedef struct _rinternal {
*(recno_t *)(void *)p = nrecs; \
p += sizeof(recno_t); \
*(pgno_t *)(void *)p = pgno; \
} while (/*CONSTCOND*/0)
} while (0)
/* For the btree leaf pages, the item is a key and data pair. */
typedef struct _bleaf {
@ -236,7 +236,7 @@ NBLEAFDBT(size_t k, size_t d) {
(void)memmove(p, key->data, key->size); \
p += key->size; \
(void)memmove(p, data->data, data->size); \
} while (/*CONSTCOND*/0)
} while (0)
/* For the recno leaf pages, the item is a data entry. */
typedef struct _rleaf {
@ -276,7 +276,7 @@ NRLEAFDBT(size_t d) {
*(uint8_t *)(void *)p = flags; \
p += sizeof(uint8_t); \
memmove(p, data->data, data->size); \
} while (/*CONSTCOND*/0)
} while (0)
/*
* A record in the tree is either a pointer to a page and an index in the page

View File

@ -1,4 +1,4 @@
/* $NetBSD: gdtoaimp.h,v 1.18 2022/01/26 11:48:53 andvar Exp $ */
/* $NetBSD: gdtoaimp.h,v 1.19 2022/04/19 20:32:15 rillig Exp $ */
/****************************************************************
@ -505,12 +505,12 @@ extern mutex_t __gdtoa_locks[2];
do { \
if (__isthreaded) \
mutex_lock(&__gdtoa_locks[n]); \
} while (/* CONSTCOND */ 0)
} while (0)
#define FREE_DTOA_LOCK(n) \
do { \
if (__isthreaded) \
mutex_unlock(&__gdtoa_locks[n]); \
} while (/* CONSTCOND */ 0)
} while (0)
#endif
#define Kmax (sizeof(size_t) << 3)

View File

@ -1,4 +1,4 @@
/* $NetBSD: arc4random.c,v 1.32 2019/09/23 18:17:03 christos Exp $ */
/* $NetBSD: arc4random.c,v 1.33 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: arc4random.c,v 1.32 2019/09/23 18:17:03 christos Exp $");
__RCSID("$NetBSD: arc4random.c,v 1.33 2022/04/19 20:32:15 rillig Exp $");
#include "namespace.h"
#include "reentrant.h"
@ -123,7 +123,7 @@ rotate(uint32_t u, unsigned c)
(c) += (d); (b) ^= (c); (b) = rotate((b), 12); \
(a) += (b); (d) ^= (a); (d) = rotate((d), 8); \
(c) += (d); (b) ^= (c); (b) = rotate((b), 7); \
} while (/*CONSTCOND*/0)
} while (0)
const uint8_t crypto_core_constant32[16] = "expand 32-byte k";

View File

@ -1,4 +1,4 @@
/* $NetBSD: fts.c,v 1.51 2022/03/12 17:31:39 christos Exp $ */
/* $NetBSD: fts.c,v 1.52 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#else
__RCSID("$NetBSD: fts.c,v 1.51 2022/03/12 17:31:39 christos Exp $");
__RCSID("$NetBSD: fts.c,v 1.52 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -1177,7 +1177,7 @@ fts_padjust(FTS *sp, FTSENT *head)
(p)->fts_accpath = \
addr + ((p)->fts_accpath - (p)->fts_path); \
(p)->fts_path = addr; \
} while (/*CONSTCOND*/0)
} while (0)
addr = sp->fts_path;

View File

@ -1,4 +1,4 @@
/* $NetBSD: getpwent.c,v 1.82 2017/01/14 22:19:29 christos Exp $ */
/* $NetBSD: getpwent.c,v 1.83 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1997-2000, 2004-2005 The NetBSD Foundation, Inc.
@ -88,7 +88,7 @@
#if 0
static char sccsid[] = "@(#)getpwent.c 8.2 (Berkeley) 4/27/95";
#else
__RCSID("$NetBSD: getpwent.c,v 1.82 2017/01/14 22:19:29 christos Exp $");
__RCSID("$NetBSD: getpwent.c,v 1.83 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -271,7 +271,7 @@ _pw_getkey(DB *db, DBT *key,
* THE DECODING BELOW MUST MATCH THAT IN pwd_mkdb.
*/
t = buffer;
#define MACRO(a) do { a } while (/*CONSTCOND*/0)
#define MACRO(a) do { a } while (0)
#define EXPAND(e) MACRO(e = t; while ((*t++ = *p++));)
#define SCALAR(v) MACRO(memmove(&(v), p, sizeof v); p += sizeof v;)
EXPAND(pw->pw_name);

View File

@ -1,4 +1,4 @@
/* $NetBSD: popen.c,v 1.37 2021/10/29 19:27:06 kre Exp $ */
/* $NetBSD: popen.c,v 1.38 2022/04/19 20:32:15 rillig Exp $ */
/*
* Copyright (c) 1988, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 5/3/95";
#else
__RCSID("$NetBSD: popen.c,v 1.37 2021/10/29 19:27:06 kre Exp $");
__RCSID("$NetBSD: popen.c,v 1.38 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -78,12 +78,12 @@ static mutex_t pidlist_mutex = MUTEX_INITIALIZER;
do { \
if (__isthreaded) \
mutex_lock(&pidlist_mutex); \
} while (/*CONSTCOND*/0)
} while (0)
# define MUTEX_UNLOCK() \
do { \
if (__isthreaded) \
mutex_unlock(&pidlist_mutex); \
} while (/*CONSTCOND*/0)
} while (0)
#else
# define MUTEX_LOCK() __nothing
# define MUTEX_UNLOCK() __nothing

View File

@ -1,4 +1,4 @@
/* $NetBSD: pwcache.c,v 1.33 2021/12/05 05:03:05 msaitoh Exp $ */
/* $NetBSD: pwcache.c,v 1.34 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@ -74,7 +74,7 @@
#if 0
static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: pwcache.c,v 1.33 2021/12/05 05:03:05 msaitoh Exp $");
__RCSID("$NetBSD: pwcache.c,v 1.34 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -524,7 +524,7 @@ gid_from_group(const char *name, gid_t *gid)
arr = NULL; \
} \
fail = 0; \
} while (/* CONSTCOND */0);
} while (0);
int
pwcache_userdb(

View File

@ -1,4 +1,4 @@
/* $NetBSD: setmode.c,v 1.37 2022/03/12 17:31:39 christos Exp $ */
/* $NetBSD: setmode.c,v 1.38 2022/04/19 20:32:15 rillig Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
#else
__RCSID("$NetBSD: setmode.c,v 1.37 2022/03/12 17:31:39 christos Exp $");
__RCSID("$NetBSD: setmode.c,v 1.38 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -172,7 +172,7 @@ common: if (set->cmd2 & CMD2_CLR) {
endset = newset + (setlen - 2); \
} \
set = addcmd(set, (mode_t)(a), (mode_t)(b), (mode_t)(c), (d)); \
} while (/*CONSTCOND*/0)
} while (0)
#define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctlgetmibinfo.c,v 1.14 2019/08/27 22:48:53 kamil Exp $ */
/* $NetBSD: sysctlgetmibinfo.c,v 1.15 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 2003,2004 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: sysctlgetmibinfo.c,v 1.14 2019/08/27 22:48:53 kamil Exp $");
__RCSID("$NetBSD: sysctlgetmibinfo.c,v 1.15 2022/04/19 20:32:15 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#ifndef RUMP_ACTION
@ -483,7 +483,7 @@ sysctlgetmibinfo_unlocked(const char *gname, int *iname, u_int *namelenp,
*(cs) = strlen(t) + 1; \
if ((nlp) != NULL) \
*(nlp) = (l); \
} while (/*CONSTCOND*/0)
} while (0)
piece = gname;
while (piece != NULL && *piece != '\0') {

View File

@ -1,4 +1,4 @@
/* $NetBSD: syslog_private.h,v 1.3 2020/03/02 14:18:50 christos Exp $ */
/* $NetBSD: syslog_private.h,v 1.4 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
prlen = tbuf_left - 1; \
p += prlen; \
tbuf_left -= prlen; \
} while (/*CONSTCOND*/0)
} while (0)
struct syslog_fun {
size_t (*timefun)(char *, size_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $ */
/* $NetBSD: unvis.c,v 1.45 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: unvis.c,v 1.44 2014/09/26 15:43:36 roy Exp $");
__RCSID("$NetBSD: unvis.c,v 1.45 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -505,7 +505,7 @@ strnunvisx(char *dst, size_t dlen, const char *src, int flag)
errno = ENOSPC; \
return -1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
while ((c = *src++) != '\0') {
again:

View File

@ -1,4 +1,4 @@
/* $NetBSD: list.h,v 1.5 2009/04/12 17:07:16 christos Exp $ */
/* $NetBSD: list.h,v 1.6 2022/04/19 20:32:15 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -23,14 +23,14 @@
#define LIST(type) struct { type *head, *tail; }
#define INIT_LIST(list) \
do { (list).head = NULL; (list).tail = NULL; } while (/*CONSTCOND*/0)
do { (list).head = NULL; (list).tail = NULL; } while (0)
#define LINK(type) struct { type *prev, *next; }
#define INIT_LINK_TYPE(elt, link, type) \
do { \
(elt)->link.prev = (type *)(-1); \
(elt)->link.next = (type *)(-1); \
} while (/*CONSTCOND*/0)
} while (0)
#define INIT_LINK(elt, link) \
INIT_LINK_TYPE(elt, link, void)
#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1) && \
@ -50,7 +50,7 @@
(elt)->link.prev = NULL; \
(elt)->link.next = (list).head; \
(list).head = (elt); \
} while (/*CONSTCOND*/0)
} while (0)
#define APPEND(list, elt, link) \
do { \
@ -62,7 +62,7 @@
(elt)->link.prev = (list).tail; \
(elt)->link.next = NULL; \
(list).tail = (elt); \
} while (/*CONSTCOND*/0)
} while (0)
#define UNLINK_TYPE(list, elt, link, type) \
do { \
@ -80,7 +80,7 @@
(list).head = (elt)->link.next; \
} \
INIT_LINK_TYPE(elt, link, type); \
} while (/*CONSTCOND*/0)
} while (0)
#define UNLINK(list, elt, link) \
UNLINK_TYPE(list, elt, link, void)
@ -98,7 +98,7 @@
(elt)->link.prev->link.next = (elt); \
(elt)->link.next = (before); \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define INSERT_AFTER(list, after, elt, link) \
do { \
@ -111,7 +111,7 @@
(elt)->link.next->link.prev = (elt); \
(elt)->link.prev = (after); \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define ENQUEUE(list, elt, link) APPEND(list, elt, link)
#define DEQUEUE(list, elt, link) UNLINK(list, elt, link)

View File

@ -1,4 +1,4 @@
/* $NetBSD: nb_lc_template.h,v 1.8 2013/09/13 13:13:32 joerg Exp $ */
/* $NetBSD: nb_lc_template.h,v 1.9 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c)1999, 2008 Citrus Project,
@ -189,7 +189,7 @@ do { \
_DIAGASSERT(!ret || !force); \
goto done; \
} \
} while (/*CONSTCOND*/0)
} while (0)
/* (1) non-aliased file */
mutex_lock(&_nb_mutex);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rune.c,v 1.46 2013/04/13 10:21:20 joerg Exp $ */
/* $NetBSD: rune.c,v 1.47 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c)2010 Citrus Project,
* All rights reserved.
@ -255,7 +255,7 @@ do { \
} \
++fre, ++re; \
} \
} while (/*CONSTCOND*/0)
} while (0)
READ_RANGE(runetype);
READ_RANGE(maplower);
@ -314,7 +314,7 @@ do { \
map, &c) || c == EOF)) \
c = i; \
rlp->rlp_to##name##_tab[i + 1] = (short)c; \
} while (/*CONSTCOND*/0)
} while (0)
CONVERT_MAP(lower);
CONVERT_MAP(upper);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_print.c,v 1.11 2012/03/13 21:13:39 christos Exp $ */
/* $NetBSD: ns_print.c,v 1.12 2022/04/19 20:32:15 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -22,7 +22,7 @@
#ifdef notdef
static const char rcsid[] = "Id: ns_print.c,v 1.12 2009/03/03 05:29:58 each Exp";
#else
__RCSID("$NetBSD: ns_print.c,v 1.11 2012/03/13 21:13:39 christos Exp $");
__RCSID("$NetBSD: ns_print.c,v 1.12 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif
@ -74,7 +74,7 @@ static int addtab(size_t len, size_t target, int spaced,
do { \
if ((x) < 0) \
return (-1); \
} while (/*CONSTCOND*/0)
} while (0)
static const char base32hex[] =
"0123456789ABCDEFGHIJKLMNOPQRSTUV=0123456789abcdefghijklmnopqrstuv";

View File

@ -1,4 +1,4 @@
/* $NetBSD: getaddrinfo.c,v 1.122 2021/10/28 20:56:32 riastradh Exp $ */
/* $NetBSD: getaddrinfo.c,v 1.123 2022/04/19 20:32:15 rillig Exp $ */
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
/*
@ -55,7 +55,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: getaddrinfo.c,v 1.122 2021/10/28 20:56:32 riastradh Exp $");
__RCSID("$NetBSD: getaddrinfo.c,v 1.123 2022/04/19 20:32:15 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#ifndef RUMP_ACTION
@ -322,7 +322,7 @@ do { \
error = EAI_MEMORY; \
goto free; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define GET_PORT(ai, serv, svd) \
do { \
@ -330,7 +330,7 @@ do { \
error = get_port((ai), (serv), 0, (svd)); \
if (error != 0) \
goto free; \
} while (/*CONSTCOND*/0)
} while (0)
#define GET_CANONNAME(ai, str) \
do { \
@ -338,7 +338,7 @@ do { \
error = get_canonname(pai, (ai), (str)); \
if (error != 0) \
goto free; \
} while (/*CONSTCOND*/0)
} while (0)
#define ERR(err) \
do { \
@ -346,7 +346,7 @@ do { \
error = (err); \
goto bad; \
/*NOTREACHED*/ \
} while (/*CONSTCOND*/0)
} while (0)
#define MATCH_FAMILY(x, y, w) \
((x) == (y) || (/*CONSTCOND*/(w) && ((x) == PF_UNSPEC || \

View File

@ -1,4 +1,4 @@
/* $NetBSD: gethnamaddr.c,v 1.93 2020/11/18 12:49:52 is Exp $ */
/* $NetBSD: gethnamaddr.c,v 1.94 2022/04/19 20:32:15 rillig Exp $ */
/*
* ++Copyright++ 1985, 1988, 1993
@ -57,7 +57,7 @@
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
#else
__RCSID("$NetBSD: gethnamaddr.c,v 1.93 2020/11/18 12:49:52 is Exp $");
__RCSID("$NetBSD: gethnamaddr.c,v 1.94 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -118,13 +118,13 @@ __weak_alias(gethostent,_gethostent)
siz += 10; \
} \
*d++ = s; \
} while (/*CONSTCOND*/0)
} while (0)
#define setup(arr, siz) do { \
arr = malloc((siz = 10) * sizeof(*arr)); \
if (arr == NULL) \
goto nospc; \
} while (/*CONSTCOND*/0)
} while (0)
static const char AskedForGot[] =
@ -201,13 +201,13 @@ debugprintf(const char *msg, res_state res, ...)
cp += (x); \
if (cp > eom) \
goto no_recovery; \
} while (/*CONSTCOND*/0)
} while (0)
#define BOUNDS_CHECK(ptr, count) \
do { \
if ((ptr) + (count) > eom) \
goto no_recovery; \
} while (/*CONSTCOND*/0)
} while (0)
static struct hostent *
getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,

View File

@ -1,4 +1,4 @@
/* $NetBSD: hostent.h,v 1.2 2013/08/27 09:56:12 christos Exp $ */
/* $NetBSD: hostent.h,v 1.3 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@ -84,7 +84,7 @@ int _yp_gethtbyname(void *, void *, va_list);
dst = (void *)ptr; \
ptr += _len; \
len -= _len; \
} while (/*CONSTCOND*/0)
} while (0)
#define HENT_COPY(dst, src, slen, ptr, len) \
do { \
@ -94,13 +94,13 @@ int _yp_gethtbyname(void *, void *, va_list);
dst = ptr; \
ptr += slen; \
len -= slen; \
} while (/* CONSTCOND */0)
} while (0)
#define HENT_SCOPY(dst, src, ptr, len) \
do { \
size_t _len = strlen(src) + 1; \
HENT_COPY(dst, src, _len, ptr, len); \
} while (/* CONSTCOND */0)
} while (0)
#define MAXALIASES 35
#define MAXADDRS 35

View File

@ -1,4 +1,4 @@
/* $NetBSD: linkaddr.c,v 1.22 2016/12/07 10:03:29 pgoyette Exp $ */
/* $NetBSD: linkaddr.c,v 1.23 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: linkaddr.c,v 1.22 2016/12/07 10:03:29 pgoyette Exp $");
__RCSID("$NetBSD: linkaddr.c,v 1.23 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -151,7 +151,7 @@ link_ntoa(const struct sockaddr_dl *sdl)
if (out >= obuf + sizeof(obuf) - 1) \
return obuf; \
*out++ = (ch); \
} while (/*CONSTCOND*/0)
} while (0)
/*
* This is not needed on the first call, as the static

View File

@ -1,4 +1,4 @@
/* $NetBSD: nsdispatch.c,v 1.38 2014/09/18 13:58:20 christos Exp $ */
/* $NetBSD: nsdispatch.c,v 1.39 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: nsdispatch.c,v 1.38 2014/09/18 13:58:20 christos Exp $");
__RCSID("$NetBSD: nsdispatch.c,v 1.39 2022/04/19 20:32:15 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@ -238,7 +238,7 @@ _nsvect_free(void *vec, u_int *count, size_t esize, _nsvect_free_elem free_elem)
do { \
_nsvect_free((v), (c), (s), (f)); \
(v) = NULL; \
} while (/*CONSTCOND*/0)
} while (0)
static int
_nsdbtcmp(const void *a, const void *b)

View File

@ -1,4 +1,4 @@
/* $NetBSD: fileext.h,v 1.6 2010/01/11 20:39:29 joerg Exp $ */
/* $NetBSD: fileext.h,v 1.7 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c)2001 Citrus Project,
@ -64,11 +64,11 @@ struct __sfileext {
_LOCKOWNER(f) = NULL; \
_LOCKCOUNT(f) = 0; \
_LOCKINTERNAL(f) = 0; \
} while (/* CONSTCOND */ 0)
} while (0)
#else
#define _FILEEXT_SETUP(f, fext) do { \
/* LINTED */(f)->_ext._base = (unsigned char *)(fext); \
(fext)->_fgetstr_len = 0; \
(fext)->_fgetstr_buf = NULL; \
} while (/* CONSTCOND */ 0)
} while (0)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfscanf.c,v 1.45 2013/05/17 12:55:57 joerg Exp $ */
/* $NetBSD: vfscanf.c,v 1.46 2022/04/19 20:32:15 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -38,7 +38,7 @@
static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD: src/lib/libc/stdio/vfscanf.c,v 1.41 2007/01/09 00:28:07 imp Exp $");
#else
__RCSID("$NetBSD: vfscanf.c,v 1.45 2013/05/17 12:55:57 joerg Exp $");
__RCSID("$NetBSD: vfscanf.c,v 1.46 2022/04/19 20:32:15 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -150,7 +150,7 @@ __svfscanf_l(FILE *fp, locale_t loc, char const *fmt0, va_list ap)
do { \
while ((fp->_r > 0 || __srefill(fp) == 0) && isspace_l(*fp->_p, loc)) \
nread++, fp->_r--, fp->_p++; \
} while (/*CONSTCOND*/ 0)
} while (0)
/*
* __svfscanf_unlocked - non-MT-safe version of __svfscanf

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfwprintf.c,v 1.38 2022/03/12 17:31:39 christos Exp $ */
/* $NetBSD: vfwprintf.c,v 1.39 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -38,7 +38,7 @@
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.27 2007/01/09 00:28:08 imp Exp $");
#else
__RCSID("$NetBSD: vfwprintf.c,v 1.38 2022/03/12 17:31:39 christos Exp $");
__RCSID("$NetBSD: vfwprintf.c,v 1.39 2022/04/19 20:32:16 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -719,7 +719,7 @@ WDECL(__vf,printf_unlocked_l)(FILE *fp, locale_t loc, const CHAR_T *fmt0, va_lis
fp->_flags |= __SERR; \
goto error; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define FLUSH()
#else
#define PRINT(ptr, len) do { \
@ -732,13 +732,13 @@ WDECL(__vf,printf_unlocked_l)(FILE *fp, locale_t loc, const CHAR_T *fmt0, va_lis
goto error; \
iovp = iov; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define FLUSH() do { \
if (uio.uio_resid && __sprint(fp, &uio)) \
goto error; \
uio.uio_iovcnt = 0; \
iovp = iov; \
} while (/*CONSTCOND*/0)
} while (0)
#endif /* NARROW */
#define PAD(howmany, with) do { \
@ -749,7 +749,7 @@ WDECL(__vf,printf_unlocked_l)(FILE *fp, locale_t loc, const CHAR_T *fmt0, va_lis
} \
PRINT(with, n); \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define PRINTANDPAD(p, ep, len, with) do { \
ptrdiff_t td = (ep) - (p); \
_DIAGASSERT(__type_fit(int, td)); \
@ -759,7 +759,7 @@ WDECL(__vf,printf_unlocked_l)(FILE *fp, locale_t loc, const CHAR_T *fmt0, va_lis
if (n2 > 0) \
PRINT((p), n2); \
PAD((len) - (n2 > 0 ? n2 : 0), (with)); \
} while(/*CONSTCOND*/0)
} while (0)
/*
* Get the argument indexed by nextarg. If the argument table is
@ -1626,7 +1626,7 @@ __find_arguments(const CHAR_T *fmt0, va_list ap, union arg **argtable)
tablemax = nextarg; \
typetable[nextarg++] = type; \
nitems++; \
} while (/*CONSTCOND*/0)
} while (0)
#define ADDSARG() \
do { \
@ -1642,7 +1642,7 @@ __find_arguments(const CHAR_T *fmt0, va_list ap, union arg **argtable)
ADDTYPE(T_LONG); \
else \
ADDTYPE(T_INT); \
} while (/*CONSTCOND*/0)
} while (0)
#define ADDUARG() \
do { \
@ -1658,7 +1658,7 @@ __find_arguments(const CHAR_T *fmt0, va_list ap, union arg **argtable)
ADDTYPE(T_U_LONG); \
else \
ADDTYPE(T_U_INT); \
} while (/*CONSTCOND*/0)
} while (0)
/*
* Add * arguments to the type array.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfwscanf.c,v 1.12 2014/06/12 22:21:20 justin Exp $ */
/* $NetBSD: vfwscanf.c,v 1.13 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -42,7 +42,7 @@
static char sccsid[] = "@(#)ftell.c 8.2 (Berkeley) 5/4/95";
__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwscanf.c,v 1.12 2004/05/02 20:13:29 obrien Exp $");
#else
__RCSID("$NetBSD: vfwscanf.c,v 1.12 2014/06/12 22:21:20 justin Exp $");
__RCSID("$NetBSD: vfwscanf.c,v 1.13 2022/04/19 20:32:16 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -140,7 +140,7 @@ do { \
continue; \
if (tc != WEOF) \
ungetwc(tc, fp); \
} while (/*CONSTCOND*/ 0)
} while (0)
/*
* Non-MT-safe version.

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsnprintf_ss.c,v 1.13 2014/09/29 14:58:33 christos Exp $ */
/* $NetBSD: vsnprintf_ss.c,v 1.14 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vsnprintf_ss.c,v 1.13 2014/09/29 14:58:33 christos Exp $");
__RCSID("$NetBSD: vsnprintf_ss.c,v 1.14 2022/04/19 20:32:16 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -113,7 +113,7 @@ __weak_alias(vsnprintf_ss,_vsnprintf_ss)
#define PUTCHAR(C) do { \
if (sbuf < tailp) \
*sbuf++ = (C); \
} while (/*CONSTCOND*/0)
} while (0)
int
vsnprintf_ss(char *sbuf, size_t slen, const char *fmt0, va_list ap)

View File

@ -1,4 +1,4 @@
/* $NetBSD: wcio.h,v 1.3 2003/01/18 11:30:00 thorpej Exp $ */
/* $NetBSD: wcio.h,v 1.4 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c)2001 Citrus Project,
@ -51,7 +51,7 @@ do {\
struct wchar_io_data *_wcio = WCIO_GET(fp);\
if (_wcio && _wcio->wcio_mode == 0)\
_wcio->wcio_mode = (mode);\
} while (/*CONSTCOND*/0)
} while (0)
/*
* WCIO_FREE should be called by fclose
@ -61,10 +61,10 @@ do {\
do {\
_EXT(fp)->_wcio.wcio_mode = 0;\
WCIO_FREEUB(fp);\
} while (/*CONSTCOND*/0)
} while (0)
#define WCIO_FREEUB(fp) \
do {\
_EXT(fp)->_wcio.wcio_ungetwc_inbuf = 0;\
} while (/*CONSTCOND*/0)
} while (0)
#endif /*_WCIO_H_*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $ */
/* $NetBSD: strfmon.c,v 1.15 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
@ -32,7 +32,7 @@
#if 0
__FBSDID("$FreeBSD: src/lib/libc/stdlib/strfmon.c,v 1.14 2003/03/20 08:18:55 ache Exp $");
#else
__RCSID("$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $");
__RCSID("$NetBSD: strfmon.c,v 1.15 2022/04/19 20:32:16 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -72,13 +72,13 @@ __RCSID("$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $");
if (dst >= s + maxsize) \
goto e2big_error; \
*dst++ = CH; \
} while (/* CONSTCOND */ 0)
} while (0)
#define PRINTS(STR) do { \
const char *tmps = STR; \
while (*tmps != '\0') \
PRINT(*tmps++); \
} while (/* CONSTCOND */ 0)
} while (0)
#define GET_NUMBER(VAR) do { \
VAR = 0; \
@ -89,7 +89,7 @@ __RCSID("$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $");
goto e2big_error; \
fmt++; \
} \
} while (/* CONSTCOND */ 0)
} while (0)
#define GRPCPY(howmany) do { \
int i = howmany; \
@ -97,12 +97,12 @@ __RCSID("$NetBSD: strfmon.c,v 1.14 2021/12/05 08:09:30 msaitoh Exp $");
avalue_size--; \
*--bufend = *(avalue+avalue_size+padded); \
} \
} while (/* CONSTCOND */ 0)
} while (0)
#define GRPSEP do { \
*--bufend = thousands_sep; \
groups++; \
} while (/* CONSTCOND */ 0)
} while (0)
static void __setup_vars(struct lconv *, int, char *, char *, char *, const char **);
static int __calc_left_pad(struct lconv *, int, char *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: thread-stub.c,v 1.31 2021/02/06 00:08:58 jdolecek Exp $ */
/* $NetBSD: thread-stub.c,v 1.32 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2003, 2009 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: thread-stub.c,v 1.31 2021/02/06 00:08:58 jdolecek Exp $");
__RCSID("$NetBSD: thread-stub.c,v 1.32 2022/04/19 20:32:16 rillig Exp $");
#endif /* LIBC_SCCS and not lint */
/*
@ -62,7 +62,7 @@ extern int __isthreaded;
do { \
if (__isthreaded) \
DIE(); \
} while (/*CONSTCOND*/0)
} while (0)
#if 1
#define CHECK_NOT_THREADED() CHECK_NOT_THREADED_ALWAYS()

View File

@ -1,4 +1,4 @@
/* $NetBSD: keymap.h,v 1.4 2012/04/21 12:27:28 roy Exp $ */
/* $NetBSD: keymap.h,v 1.5 2022/04/19 20:32:16 rillig Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation Inc.
@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: keymap.h,v 1.4 2012/04/21 12:27:28 roy Exp $");
__RCSID("$NetBSD: keymap.h,v 1.5 2022/04/19 20:32:16 rillig Exp $");
#endif /* not lint */
/* keymap related stuff */
@ -97,7 +97,7 @@ struct keymap {
#define INC_POINTER(ptr) do { \
(ptr)++; \
(ptr) %= INBUF_SZ; \
} while(/*CONSTCOND*/0)
} while (0)
#define INKEY_NORM 0 /* no key backlog to process */
#define INKEY_ASSEMBLING 1 /* assembling a multi-key sequence */

View File

@ -1,4 +1,4 @@
/* $NetBSD: plural_parser.c,v 1.3 2019/10/03 16:37:45 christos Exp $ */
/* $NetBSD: plural_parser.c,v 1.4 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2005 Citrus Project,
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: plural_parser.c,v 1.3 2019/10/03 16:37:45 christos Exp $");
__RCSID("$NetBSD: plural_parser.c,v 1.4 2022/04/19 20:32:16 rillig Exp $");
#include <assert.h>
#include <stdio.h>
@ -351,7 +351,7 @@ quit:
do { \
if (T_IS_ERROR(token)) \
goto label; \
} while (/*CONSTCOND*/0)
} while (0)
#define T_ENSURE_SOMETHING(token, label) \
do { \
if ((token) == T_EOF) { \
@ -359,7 +359,7 @@ do { \
goto label; \
} else if (T_IS_ERROR(token)) \
goto label; \
} while (/*CONSTCOND*/0)
} while (0)
#define parser_element plural_element

View File

@ -1,4 +1,4 @@
/* $NetBSD: isns_config.h,v 1.1.1.1 2011/01/16 01:22:50 agc Exp $ */
/* $NetBSD: isns_config.h,v 1.2 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@ -36,9 +36,9 @@
#define _ISNS_CONFIG_H_
#ifdef ISNS_DEBUG
#define DBG(...) do { printf(__VA_ARGS__); } while (/* CONSTCOND */0)
#define DBG(...) do { printf(__VA_ARGS__); } while (0)
#else
#define DBG(...) do {} while (/* CONSTCOND */ 0)
#define DBG(...) do {} while (0)
#endif
#include "isns_fileio.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: isns_pdu.h,v 1.4 2019/10/08 19:38:38 christos Exp $ */
/* $NetBSD: isns_pdu.h,v 1.5 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
((struct isns_buffer_s *)(_bufp))->alloc_len &= ~0x03; \
((struct isns_buffer_s *)(_bufp))->buf_type = (_type); \
((struct isns_buffer_s *)(_bufp))->next = NULL; \
} while (/* CONSTCOND */0)
} while (0)
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: kvm_private.h,v 1.22 2022/01/10 19:51:30 christos Exp $ */
/* $NetBSD: kvm_private.h,v 1.23 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -135,4 +135,4 @@ ssize_t _kvm_pread(kvm_t *, int, void *, size_t, off_t);
kd->member ## _len = 0; \
return (NULL); \
} \
} while (/*CONSTCOND*/0)
} while (0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: kvm_proc.c,v 1.97 2022/01/10 20:04:01 christos Exp $ */
/* $NetBSD: kvm_proc.c,v 1.98 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
__RCSID("$NetBSD: kvm_proc.c,v 1.97 2022/01/10 20:04:01 christos Exp $");
__RCSID("$NetBSD: kvm_proc.c,v 1.98 2022/04/19 20:32:16 rillig Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -133,7 +133,7 @@ struct miniproc {
(p)->p_paddr = NULL; \
(p)->p_vmspace = (kp)->p_vmspace; \
(p)->p_psstrp = (kp)->p_psstrp; \
} while (/*CONSTCOND*/0);
} while (0);
#define KPTOMINI(kp, p) \
do { \
@ -141,7 +141,7 @@ struct miniproc {
(p)->p_pid = (kp)->kp_proc.p_pid; \
(p)->p_paddr = (kp)->kp_eproc.e_paddr; \
(p)->p_vmspace = (kp)->kp_proc.p_vmspace; \
} while (/*CONSTCOND*/0);
} while (0);
#define KP2TOMINI(kp, p) \
do { \
@ -149,7 +149,7 @@ struct miniproc {
(p)->p_pid = (kp)->p_pid; \
(p)->p_paddr = (void *)(long)(kp)->p_paddr; \
(p)->p_vmspace = (void *)(long)(kp)->p_vmspace; \
} while (/*CONSTCOND*/0);
} while (0);
/*
* NetBSD uses kauth(9) to manage credentials, which are stored in kauth_cred_t,

View File

@ -1,4 +1,4 @@
/* $NetBSD: catrig.c,v 1.2 2016/09/20 18:25:20 christos Exp $ */
/* $NetBSD: catrig.c,v 1.3 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2012 Stephen Montgomery-Smith <stephen@FreeBSD.ORG>
* All rights reserved.
@ -29,7 +29,7 @@
#if 0
__FBSDID("$FreeBSD: head/lib/msun/src/catrig.c 275819 2014-12-16 09:21:56Z ed $");
#endif
__RCSID("$NetBSD: catrig.c,v 1.2 2016/09/20 18:25:20 christos Exp $");
__RCSID("$NetBSD: catrig.c,v 1.3 2022/04/19 20:32:16 rillig Exp $");
#include "namespace.h"
#ifdef __weak_alias
@ -51,7 +51,7 @@ __weak_alias(catan, _catan)
#define isinf(x) (fabs(x) == INFINITY)
#undef isnan
#define isnan(x) ((x) != (x))
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while(/*CONSTCOND*/0)
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while (0)
#undef signbit
#define signbit(x) (__builtin_signbit(x))

View File

@ -1,4 +1,4 @@
/* $NetBSD: catrigf.c,v 1.1 2016/09/19 22:05:05 christos Exp $ */
/* $NetBSD: catrigf.c,v 1.2 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2012 Stephen Montgomery-Smith <stephen@FreeBSD.ORG>
* All rights reserved.
@ -43,7 +43,7 @@
#if 0
__FBSDID("$FreeBSD: head/lib/msun/src/catrigf.c 275819 2014-12-16 09:21:56Z ed $");
#endif
__RCSID("$NetBSD: catrigf.c,v 1.1 2016/09/19 22:05:05 christos Exp $");
__RCSID("$NetBSD: catrigf.c,v 1.2 2022/04/19 20:32:16 rillig Exp $");
#include "namespace.h"
#ifdef __weak_alias
@ -64,7 +64,7 @@ __weak_alias(catanf, _catanf)
#define isinf(x) (fabsf(x) == INFINITY)
#undef isnan
#define isnan(x) ((x) != (x))
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while(/*CONSTCOND*/0)
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while (0)
#undef signbit
#define signbit(x) (__builtin_signbitf(x))

View File

@ -1,4 +1,4 @@
/* $NetBSD: catrigl.c,v 1.2 2017/05/07 21:59:06 christos Exp $ */
/* $NetBSD: catrigl.c,v 1.3 2022/04/19 20:32:16 rillig Exp $ */
/*-
* Copyright (c) 2012 Stephen Montgomery-Smith <stephen@FreeBSD.ORG>
* All rights reserved.
@ -35,7 +35,7 @@
* The code for catrig.c contains complete comments.
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: catrigl.c,v 1.2 2017/05/07 21:59:06 christos Exp $");
__RCSID("$NetBSD: catrigl.c,v 1.3 2022/04/19 20:32:16 rillig Exp $");
#include "namespace.h"
#ifdef __weak_alias
@ -58,7 +58,7 @@ __weak_alias(catanl, _catanl)
#define isinf(x) (fabsl(x) == INFINITY)
#undef isnan
#define isnan(x) ((x) != (x))
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while(/*CONSTCOND*/0)
#define raise_inexact() do { volatile float junk __unused = /*LINTED*/1 + tiny; } while (0)
#undef signbit
#define signbit(x) (__builtin_signbitl(x))
@ -90,7 +90,7 @@ union ieee_ext_u {
u.extu_ld = s; \
r = u.extu_sign; \
r >>= EXT_EXPBITS - 1; \
} while (/*CONSTCOND*/0)
} while (0)
#define SET_LDBL_EXPSIGN(s, r) \
do { \
union ieee_ext_u u; \
@ -98,7 +98,7 @@ union ieee_ext_u {
u.extu_exp &= __BITS(0, EXT_EXPBITS - 1); \
u.extu_exp |= (r) << (EXT_EXPBITS - 1); \
s = u.extu_ld; \
} while (/*CONSTCOND*/0)
} while (0)
static const long double
A_crossover = 10,

View File

@ -11,7 +11,7 @@
/*
* from: @(#)fdlibm.h 5.1 93/09/24
* $NetBSD: math_private.h,v 1.23 2016/09/19 22:05:05 christos Exp $
* $NetBSD: math_private.h,v 1.24 2022/04/19 20:32:16 rillig Exp $
*/
#ifndef _MATH_PRIVATE_H_
@ -81,7 +81,7 @@ do { \
ew_u.value = (d); \
(ix0) = ew_u.parts.msw; \
(ix1) = ew_u.parts.lsw; \
} while (/*CONSTCOND*/0)
} while (0)
/* Get a 64-bit int from a double. */
#define EXTRACT_WORD64(ix,d) \
@ -89,7 +89,7 @@ do { \
ieee_double_shape_type ew_u; \
ew_u.value = (d); \
(ix) = ew_u.xparts.w; \
} while (/*CONSTCOND*/0)
} while (0)
/* Get the more significant 32 bit int from a double. */
@ -99,7 +99,7 @@ do { \
ieee_double_shape_type gh_u; \
gh_u.value = (d); \
(i) = gh_u.parts.msw; \
} while (/*CONSTCOND*/0)
} while (0)
/* Get the less significant 32 bit int from a double. */
@ -108,7 +108,7 @@ do { \
ieee_double_shape_type gl_u; \
gl_u.value = (d); \
(i) = gl_u.parts.lsw; \
} while (/*CONSTCOND*/0)
} while (0)
/* Set a double from two 32 bit ints. */
@ -118,7 +118,7 @@ do { \
iw_u.parts.msw = (ix0); \
iw_u.parts.lsw = (ix1); \
(d) = iw_u.value; \
} while (/*CONSTCOND*/0)
} while (0)
/* Set a double from a 64-bit int. */
#define INSERT_WORD64(d,ix) \
@ -126,7 +126,7 @@ do { \
ieee_double_shape_type iw_u; \
iw_u.xparts.w = (ix); \
(d) = iw_u.value; \
} while (/*CONSTCOND*/0)
} while (0)
/* Set the more significant 32 bits of a double from an int. */
@ -137,7 +137,7 @@ do { \
sh_u.value = (d); \
sh_u.parts.msw = (v); \
(d) = sh_u.value; \
} while (/*CONSTCOND*/0)
} while (0)
/* Set the less significant 32 bits of a double from an int. */
@ -147,7 +147,7 @@ do { \
sl_u.value = (d); \
sl_u.parts.lsw = (v); \
(d) = sl_u.value; \
} while (/*CONSTCOND*/0)
} while (0)
/* A union which permits us to convert between a float and a 32 bit
int. */
@ -165,7 +165,7 @@ do { \
ieee_float_shape_type gf_u; \
gf_u.value = (d); \
(i) = gf_u.word; \
} while (/*CONSTCOND*/0)
} while (0)
/* Set a float from a 32 bit int. */
@ -174,7 +174,7 @@ do { \
ieee_float_shape_type sf_u; \
sf_u.word = (i); \
(d) = sf_u.value; \
} while (/*CONSTCOND*/0)
} while (0)
/*
* Attempt to get strict C99 semantics for assignment with non-C99 compilers.
@ -191,7 +191,7 @@ do { \
__lval = (rval); \
(lval) = __lval; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#endif
#ifdef _COMPLEX_H

View File

@ -1,4 +1,4 @@
/* $NetBSD: p2k.c,v 1.73 2020/02/23 15:46:38 ad Exp $ */
/* $NetBSD: p2k.c,v 1.74 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@ -769,13 +769,13 @@ do { \
} else { \
va_compat = __UNCONST(va); \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define UNDOCOMPAT(va_compat) \
do { \
if (needcompat()) \
rump_pub_vattr_free(va_compat); \
} while (/*CONSTCOND*/0)
} while (0)
static int
do_makenode(struct puffs_usermount *pu, struct p2k_node *p2n_dir,

View File

@ -1,4 +1,4 @@
/* $NetBSD: panel_impl.h,v 1.2 2015/11/02 01:06:15 kamil Exp $ */
/* $NetBSD: panel_impl.h,v 1.3 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2015 Valery Ushakov
@ -64,7 +64,7 @@ extern PANEL _stdscr_panel __dso_hidden;
TAILQ_REMOVE((head), (elm), field); \
(elm)->field.tqe_next = NULL; \
(elm)->field.tqe_prev = NULL; \
} while (/*CONSTCOND*/ 0)
} while (0)
#define TAILQ_LINKED_NP(elm, field) \
(((elm)->field.tqe_prev) != NULL)
@ -72,15 +72,15 @@ extern PANEL _stdscr_panel __dso_hidden;
#define DECK_INSERT_TOP(p) do { \
TAILQ_INSERT_TAIL(&_deck, (p), zorder); \
} while (/*CONSTCOND*/ 0)
} while (0)
#define DECK_INSERT_BOTTOM(p) do { \
TAILQ_INSERT_AFTER(&_deck, &_stdscr_panel, (p), zorder); \
} while (/*CONSTCOND*/ 0)
} while (0)
#define DECK_REMOVE(p) do { \
TAILQ_REMOVE_NP(&_deck, (p), zorder); \
} while (/*CONSTCOND*/ 0)
} while (0)
#define PANEL_ABOVE(p) (TAILQ_NEXT((p), zorder))

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread_cancelstub.c,v 1.42 2022/04/10 10:38:33 riastradh Exp $ */
/* $NetBSD: pthread_cancelstub.c,v 1.43 2022/04/19 20:32:17 rillig Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@ -33,7 +33,7 @@
#undef _FORTIFY_SOURCE
#include <sys/cdefs.h>
__RCSID("$NetBSD: pthread_cancelstub.c,v 1.42 2022/04/10 10:38:33 riastradh Exp $");
__RCSID("$NetBSD: pthread_cancelstub.c,v 1.43 2022/04/19 20:32:17 rillig Exp $");
/* Need to use libc-private names for atomic operations. */
#include "../../common/lib/libc/atomic/atomic_op_namespace.h"
@ -147,7 +147,7 @@ int __sigsuspend14(const sigset_t *);
if (__predict_true(!__uselibcstub) && \
__predict_false((id)->pt_cancel)) \
pthread__cancelled(); \
} while (/*CONSTCOND*/0)
} while (0)
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread_int.h,v 1.108 2022/02/12 14:59:32 riastradh Exp $ */
/* $NetBSD: pthread_int.h,v 1.109 2022/04/19 20:32:17 rillig Exp $ */
/*-
* Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020
@ -246,7 +246,7 @@ int pthread__find(pthread_t) PTHREAD_HIDE;
#define _INITCONTEXT_U(ucp) do { \
(ucp)->uc_flags = _UC_CPU | _UC_STACK; \
_INITCONTEXT_U_MD(ucp) \
} while (/*CONSTCOND*/0)
} while (0)
#if !defined(__HAVE_TLS_VARIANT_I) && !defined(__HAVE_TLS_VARIANT_II)
@ -276,14 +276,14 @@ pthread__self(void)
#define pthread__assert(e) do { \
if (__predict_false(!(e))) \
pthread__assertfunc(__FILE__, __LINE__, __func__, #e); \
} while (/*CONSTCOND*/0)
} while (0)
#define pthread__error(err, msg, e) do { \
if (__predict_false(!(e))) { \
pthread__errorfunc(__FILE__, __LINE__, __func__, msg); \
return (err); \
} \
} while (/*CONSTCOND*/0)
} while (0)
void *pthread_tsd_init(size_t *) PTHREAD_HIDE;
void pthread__destroy_tsd(pthread_t) PTHREAD_HIDE;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread_queue.h,v 1.6 2022/04/10 10:38:33 riastradh Exp $ */
/* $NetBSD: pthread_queue.h,v 1.7 2022/04/19 20:32:17 rillig Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -64,7 +64,7 @@ struct { \
#define PTQ_INIT(head) do { \
(head)->ptqh_first = NULL; \
(head)->ptqh_last = &(head)->ptqh_first; \
} while (/*CONSTCOND*/0)
} while (0)
#define PTQ_INSERT_HEAD(head, elm, field) do { \
if (((elm)->field.ptqe_next = (head)->ptqh_first) != NULL) \
@ -74,7 +74,7 @@ struct { \
(head)->ptqh_last = &(elm)->field.ptqe_next; \
(head)->ptqh_first = (elm); \
(elm)->field.ptqe_prev = &(head)->ptqh_first; \
} while (/*CONSTCOND*/0)
} while (0)
#define PTQ_INSERT_TAIL(head, elm, field) do { \
(elm)->field.ptqe_next = NULL; \
@ -83,7 +83,7 @@ struct { \
(elm)->field.ptqe_prev = (head)->ptqh_last; \
*(head)->ptqh_last = (elm); \
(head)->ptqh_last = &(elm)->field.ptqe_next; \
} while (/*CONSTCOND*/0)
} while (0)
#define PTQ_INSERT_AFTER(head, listelm, elm, field) do { \
if (((elm)->field.ptqe_next = (listelm)->field.ptqe_next) != NULL)\
@ -93,14 +93,14 @@ struct { \
(head)->ptqh_last = &(elm)->field.ptqe_next; \
(listelm)->field.ptqe_next = (elm); \
(elm)->field.ptqe_prev = &(listelm)->field.ptqe_next; \
} while (/*CONSTCOND*/0)
} while (0)
#define PTQ_INSERT_BEFORE(listelm, elm, field) do { \
(elm)->field.ptqe_prev = (listelm)->field.ptqe_prev; \
(elm)->field.ptqe_next = (listelm); \
*(listelm)->field.ptqe_prev = (elm); \
(listelm)->field.ptqe_prev = &(elm)->field.ptqe_next; \
} while (/*CONSTCOND*/0)
} while (0)
#define PTQ_REMOVE(head, elm, field) do { \
if (((elm)->field.ptqe_next) != NULL) \
@ -109,7 +109,7 @@ struct { \
else \
(head)->ptqh_last = (elm)->field.ptqe_prev; \
*(elm)->field.ptqe_prev = (elm)->field.ptqe_next; \
} while (/*CONSTCOND*/0)
} while (0)
/*
* Queue access methods.

View File

@ -1,4 +1,4 @@
/* $NetBSD: framebuf.c,v 1.36 2021/10/30 10:34:18 nia Exp $ */
/* $NetBSD: framebuf.c,v 1.37 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: framebuf.c,v 1.36 2021/10/30 10:34:18 nia Exp $");
__RCSID("$NetBSD: framebuf.c,v 1.37 2022/04/19 20:32:17 rillig Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -349,7 +349,7 @@ do { \
errno = ESHUTDOWN; \
return -1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
int
puffs_framev_enqueue_cc(struct puffs_cc *pcc, int fd,

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs.c,v 1.128 2022/01/22 07:35:26 pho Exp $ */
/* $NetBSD: puffs.c,v 1.129 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
__RCSID("$NetBSD: puffs.c,v 1.128 2022/01/22 07:35:26 pho Exp $");
__RCSID("$NetBSD: puffs.c,v 1.129 2022/04/19 20:32:17 rillig Exp $");
#endif /* !lint */
#include <sys/param.h>
@ -66,7 +66,7 @@ pthread_mutex_t pu_lock = PTHREAD_MUTEX_INITIALIZER;
do { \
if (pops->puffs_node_##lower) \
opmask[PUFFS_VN_##upper] = 1; \
} while (/*CONSTCOND*/0)
} while (0)
static void
fillvnopmask(struct puffs_ops *pops, struct puffs_kargs *pa)
{
@ -563,7 +563,7 @@ do { \
rv = -1; \
goto out; \
} \
} while (/*CONSTCOND*/0)
} while (0)
len = strlen(dir)+1;
allwrite(&len, sizeof(len));
allwrite(dir, len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dst_internal.h,v 1.3 2021/11/07 20:31:09 andvar Exp $ */
/* $NetBSD: dst_internal.h,v 1.4 2022/04/19 20:32:17 rillig Exp $ */
#ifndef DST_INTERNAL_H
#define DST_INTERNAL_H
@ -67,7 +67,7 @@ typedef struct dst_key {
#ifdef DEBUG
#define EREPORT(str) printf str
#else
#define EREPORT(str) do {} while (/*CONSTCOND*/0)
#define EREPORT(str) do {} while (0)
#endif
/* use our own special macro to FRRE memory */
@ -79,7 +79,7 @@ typedef struct dst_key {
free((a)); \
(a) = NULL; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#endif
#ifndef SAFE_FREE

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_sign.c,v 1.1 2012/11/15 18:48:48 christos Exp $ */
/* $NetBSD: ns_sign.c,v 1.2 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -20,7 +20,7 @@
#if 0
static const char rcsid[] = "Id: ns_sign.c,v 1.6 2006/03/09 23:57:56 marka Exp ";
#else
__RCSID("$NetBSD: ns_sign.c,v 1.1 2012/11/15 18:48:48 christos Exp $");
__RCSID("$NetBSD: ns_sign.c,v 1.2 2022/04/19 20:32:17 rillig Exp $");
#endif
/* Import. */
@ -55,7 +55,7 @@ __RCSID("$NetBSD: ns_sign.c,v 1.1 2012/11/15 18:48:48 christos Exp $");
errno = EMSGSIZE; \
return(NS_TSIG_ERROR_NO_SPACE); \
} \
} while (/*CONSTCOND*/0)
} while (0)
/*%
* ns_sign

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_verify.c,v 1.3 2013/09/13 19:29:47 joerg Exp $ */
/* $NetBSD: ns_verify.c,v 1.4 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -52,7 +52,7 @@ __RCSID("Id: ns_verify.c,v 1.5 2006/03/09 23:57:56 marka Exp ");
if ((ptr) + (count) > eom) { \
return (NS_TSIG_ERROR_FORMERR); \
} \
} while (/*CONSTCOND*/0)
} while (0)
/* Public. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_findzonecut.c,v 1.2 2021/12/08 20:50:01 andvar Exp $ */
/* $NetBSD: res_findzonecut.c,v 1.3 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -20,7 +20,7 @@
#if 0
static const char rcsid[] = "Id: res_findzonecut.c,v 1.10 2005/10/11 00:10:16 marka Exp ";
#else
__RCSID("$NetBSD: res_findzonecut.c,v 1.2 2021/12/08 20:50:01 andvar Exp $");
__RCSID("$NetBSD: res_findzonecut.c,v 1.3 2022/04/19 20:32:17 rillig Exp $");
#endif
@ -96,7 +96,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
int save_errno = errno; \
if ((statp->options & RES_DEBUG) != 0U) res_dprintf x; \
errno = save_errno; \
} while (/*CONSTCOND*/0)
} while (0)
/* Public. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_update.c,v 1.1 2012/11/15 18:48:49 christos Exp $ */
/* $NetBSD: res_update.c,v 1.2 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@ -26,7 +26,7 @@
#if 0
static const char rcsid[] = "Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra Exp ";
#else
__RCSID("$NetBSD: res_update.c,v 1.1 2012/11/15 18:48:49 christos Exp $");
__RCSID("$NetBSD: res_update.c,v 1.2 2022/04/19 20:32:17 rillig Exp $");
#endif
@ -91,7 +91,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
int save_errno = errno; \
if ((statp->options & RES_DEBUG) != 0U) res_dprintf x; \
errno = save_errno; \
} while (/*CONSTCOND*/0)
} while (0)
/* Public. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser_dl.c,v 1.33 2020/03/22 13:30:10 pgoyette Exp $ */
/* $NetBSD: rumpuser_dl.c,v 1.34 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@ -40,7 +40,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
__RCSID("$NetBSD: rumpuser_dl.c,v 1.33 2020/03/22 13:30:10 pgoyette Exp $");
__RCSID("$NetBSD: rumpuser_dl.c,v 1.34 2022/04/19 20:32:17 rillig Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -113,7 +113,7 @@ do { \
/*LINTED*/ \
result = dyn[n].thevar; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define SYMn_GETMEMBER(base, n, thevar, result) \
do { \
@ -126,7 +126,7 @@ do { \
/*LINTED*/ \
result = sym[n].thevar; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define SYMn_SETMEMBER(base, n, thevar, value) \
do { \
@ -139,7 +139,7 @@ do { \
/*LINTED*/ \
sym[n].thevar = value; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define SYM_GETSIZE() ((eident==ELFCLASS32)?sizeof(Elf32_Sym):sizeof(Elf64_Sym))

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser_int.h,v 1.10 2014/07/22 22:41:58 justin Exp $ */
/* $NetBSD: rumpuser_int.h,v 1.11 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@ -29,7 +29,7 @@
#include <rump/rumpuser.h>
#define seterror(value) do { if (error) *error = value;} while (/*CONSTCOND*/0)
#define seterror(value) do { if (error) *error = value;} while (0)
extern struct rumpuser_hyperup rumpuser__hyp;
@ -53,7 +53,7 @@ do { \
rumpkern_unsched(&nlocks, NULL); \
a; \
rumpkern_sched(nlocks, NULL); \
} while (/*CONSTCOND*/0)
} while (0)
#define DOCALL(rvtype, call) \
{ \
@ -82,7 +82,7 @@ do { \
void rumpuser__thrinit(void);
#define NOFAIL(a) do {if (!(a)) abort();} while (/*CONSTCOND*/0)
#define NOFAIL(a) do {if (!(a)) abort();} while (0)
#define NOFAIL_ERRNO(a) \
do { \
@ -92,7 +92,7 @@ do { \
fail_rv, strerror(fail_rv)); \
abort(); \
} \
} while (/*CONSTCOND*/0)
} while (0)
int rumpuser__sig_rump2host(int);
int rumpuser__errtrans(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser_port.h,v 1.51 2021/04/03 07:38:11 simonb Exp $ */
/* $NetBSD: rumpuser_port.h,v 1.52 2022/04/19 20:32:17 rillig Exp $ */
#ifndef _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
#define _LIB_LIBRUMPUSER_RUMPUSER_PORT_H_
@ -317,7 +317,7 @@ typedef RUMP_REGISTER_T register_t;
do { \
(ts)->tv_sec = (tv)->tv_sec; \
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
} while (/*CONSTCOND*/0)
} while (0)
#endif
#if !defined(HAVE_SETPROGNAME)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukfs.c,v 1.59 2016/01/25 11:45:57 pooka Exp $ */
/* $NetBSD: ukfs.c,v 1.60 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@ -150,7 +150,7 @@ do { \
errno = ukfs_rv; \
return -1; \
} \
} while (/*CONSTCOND*/0)
} while (0)
#define POSTCALL() postcall(ukfs_curlwp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukfs.h,v 1.14 2012/07/19 06:33:03 joerg Exp $ */
/* $NetBSD: ukfs.h,v 1.15 2022/04/19 20:32:17 rillig Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@ -134,7 +134,7 @@ do { \
*part = NULL; \
else if (ukfs_part_probe(argv[argc-2], part) == -1) \
err(1, "ukfs_part_probe"); \
} while (/*CONSTCOND*/0)
} while (0)
int ukfs_part_probe(char *, struct ukfs_part **);
void ukfs_part_release(struct ukfs_part *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: stat_flags.c,v 1.2 2007/01/16 17:34:02 cbiere Exp $ */
/* $NetBSD: stat_flags.c,v 1.3 2022/04/19 20:32:17 rillig Exp $ */
/*-
* Copyright (c) 1993
@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)stat_flags.c 8.2 (Berkeley) 7/28/94";
#else
__RCSID("$NetBSD: stat_flags.c,v 1.2 2007/01/16 17:34:02 cbiere Exp $");
__RCSID("$NetBSD: stat_flags.c,v 1.3 2022/04/19 20:32:17 rillig Exp $");
#endif
#endif /* not lint */
@ -58,7 +58,7 @@ __RCSID("$NetBSD: stat_flags.c,v 1.2 2007/01/16 17:34:02 cbiere Exp $");
(void)strlcat(string, prefix, sizeof(string)); \
(void)strlcat(string, s, sizeof(string)); \
prefix = ","; \
} while (/* CONSTCOND */ 0)
} while (0)
/*
* flags_to_string --