/*CONTCOND*/ while (0)'ed macros

This commit is contained in:
perry 2002-11-02 07:20:42 +00:00
parent e4c3c3c99a
commit 6858187df6
23 changed files with 105 additions and 105 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_input.c,v 1.17 2002/02/15 07:33:51 simonb Exp $ */
/* $NetBSD: db_input.c,v 1.18 2002/11/02 07:20:42 perry Exp $ */
/*
* Mach Operating System
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.17 2002/02/15 07:33:51 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_input.c,v 1.18 2002/11/02 07:20:42 perry Exp $");
#include "opt_ddb.h"
@ -138,14 +138,14 @@ db_delete_line(void)
db_history_curr++; \
if (db_history_curr > db_history + db_history_size - 1) \
db_history_curr = db_history; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define DEC_DB_CURR() \
do { \
db_history_curr--; \
if (db_history_curr < db_history) \
db_history_curr = db_history + \
db_history_size - 1; \
} while (0)
} while (/*CONSTCOND*/ 0)
#endif
/* returns TRUE at end-of-line */

View File

@ -1,4 +1,4 @@
/* $NetBSD: aurateconv.c,v 1.6 2002/10/13 11:34:54 kent Exp $ */
/* $NetBSD: aurateconv.c,v 1.7 2002/11/02 07:23:11 perry Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.6 2002/10/13 11:34:54 kent Exp $");
__KERNEL_RCSID(0, "$NetBSD: aurateconv.c,v 1.7 2002/11/02 07:23:11 perry Exp $");
#include <sys/systm.h>
#include <sys/types.h>
@ -239,7 +239,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
do { \
if (V >= (C)->ring_end) \
V = (C)->ring_start; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define READ_S8LE(P) *(int8_t*)(P)
#define WRITE_S8LE(P, V) *(int8_t*)(P) = V
@ -254,7 +254,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
int vv = V; \
(P)[0] = vv; \
(P)[1] = vv >> 8; \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
# define READ_S16LE(P) (int16_t)((P)[0] | ((P)[1]<<8))
# define WRITE_S16LE(P, V) \
@ -262,7 +262,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
int vv = V; \
(P)[0] = vv; \
(P)[1] = vv >> 8; \
} while (0)
} while (/*CONSTCOND*/ 0)
# define READ_S16BE(P) *(int16_t*)(P)
# define WRITE_S16BE(P, V) *(int16_t*)(P) = V
#endif
@ -273,7 +273,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
(P)[0] = vvv; \
(P)[1] = vvv >> 8; \
(P)[2] = vvv >> 16; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define READ_S24BE(P) (int32_t)((P)[2] | ((P)[1]<<8) | (((int8_t)((P)[0]))<<16))
#define WRITE_S24BE(P, V) \
do { \
@ -281,7 +281,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
(P)[0] = vvv >> 16; \
(P)[1] = vvv >> 8; \
(P)[2] = vvv; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define P_READ_Sn(BITS, EN, V, RP, PAR) \
do { \
@ -290,7 +290,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
(V)[j] = READ_S##BITS####EN##(RP); \
RP += (BITS) / NBBY; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define P_WRITE_Sn(BITS, EN, V, WP, PAR, CON, WC) \
do { \
if ((PAR)->channels == 2 && (PAR)->hw_channels == 1) { \
@ -318,7 +318,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
} \
WC += (BITS) / NBBY * j; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define R_READ_Sn(BITS, EN, V, RP, PAR, CON, RC) \
do { \
@ -329,7 +329,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
RING_CHECK(CON, RP); \
RC += (BITS) / NBBY; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define R_WRITE_Sn(BITS, EN, V, WP, PAR, WC) \
do { \
if ((PAR)->channels == 2 && (PAR)->hw_channels == 1) { \
@ -350,7 +350,7 @@ auconv_play(struct auconv_context *context, const struct audio_params *params,
} \
WC += (BITS) / NBBY * j; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* Function templates

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_clock.c,v 1.80 2002/08/07 05:16:22 briggs Exp $ */
/* $NetBSD: kern_clock.c,v 1.81 2002/11/02 07:25:19 perry Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.80 2002/08/07 05:16:22 briggs Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.81 2002/11/02 07:25:19 perry Exp $");
#include "opt_callout.h"
#include "opt_ntp.h"
@ -391,13 +391,13 @@ struct simplelock callwheel_slock;
do { \
s = splclock(); \
simple_lock(&callwheel_slock); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define CALLWHEEL_UNLOCK(s) \
do { \
simple_unlock(&callwheel_slock); \
splx(s); \
} while (0)
} while (/*CONSTCOND*/ 0)
static void callout_stop_locked(struct callout *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_lock.c,v 1.65 2002/11/01 01:13:32 fvdl Exp $ */
/* $NetBSD: kern_lock.c,v 1.66 2002/11/02 07:25:20 perry Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.65 2002/11/01 01:13:32 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.66 2002/11/02 07:25:20 perry Exp $");
#include "opt_multiprocessor.h"
#include "opt_lockdebug.h"
@ -149,14 +149,14 @@ do { \
if ((flags) & LK_SPIN) \
s = spllock(); \
simple_lock(&(lkp)->lk_interlock); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define INTERLOCK_RELEASE(lkp, flags, s) \
do { \
simple_unlock(&(lkp)->lk_interlock); \
if ((flags) & LK_SPIN) \
splx(s); \
} while (0)
} while (/*CONSTCOND*/ 0)
#ifdef DDB /* { */
#ifdef MULTIPROCESSOR
@ -201,7 +201,7 @@ do { \
SLOCK_TRACE(); \
SPINLOCK_SPINCHECK_DEBUGGER; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define SPINLOCK_SPINCHECK_DECL /* nothing */
#define SPINLOCK_SPINCHECK /* nothing */

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sysctl.c,v 1.113 2002/09/04 01:32:40 matt Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.114 2002/11/02 07:25:21 perry Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.113 2002/09/04 01:32:40 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.114 2002/11/02 07:25:21 perry Exp $");
#include "opt_ddb.h"
#include "opt_insecure.h"
@ -1161,7 +1161,7 @@ sysctl_file(void *vwhere, size_t *sizep)
(dst).cgid = (src).cgid; \
(dst).mode = (src).mode; \
(dst)._seq = (src)._seq; \
} while (0);
} while (/*CONSTCOND*/ 0);
#define FILL_MSG(src, dst) do { \
FILL_PERM((src).msg_perm, (dst).msg_perm); \
(dst).msg_qnum = (src).msg_qnum; \
@ -1172,13 +1172,13 @@ sysctl_file(void *vwhere, size_t *sizep)
(dst).msg_stime = (src).msg_stime; \
(dst).msg_rtime = (src).msg_rtime; \
(dst).msg_ctime = (src).msg_ctime; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define FILL_SEM(src, dst) do { \
FILL_PERM((src).sem_perm, (dst).sem_perm); \
(dst).sem_nsems = (src).sem_nsems; \
(dst).sem_otime = (src).sem_otime; \
(dst).sem_ctime = (src).sem_ctime; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define FILL_SHM(src, dst) do { \
FILL_PERM((src).shm_perm, (dst).shm_perm); \
(dst).shm_segsz = (src).shm_segsz; \
@ -1188,7 +1188,7 @@ sysctl_file(void *vwhere, size_t *sizep)
(dst).shm_dtime = (src).shm_dtime; \
(dst).shm_ctime = (src).shm_ctime; \
(dst).shm_nattch = (src).shm_nattch; \
} while (0)
} while (/*CONSTCOND*/ 0)
static int
sysctl_sysvipc(int *name, u_int namelen, void *where, size_t *sizep)

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_prf.c,v 1.85 2002/08/26 11:34:27 scw Exp $ */
/* $NetBSD: subr_prf.c,v 1.86 2002/11/02 07:25:22 perry Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.85 2002/08/26 11:34:27 scw Exp $");
__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.86 2002/11/02 07:25:22 perry Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@ -89,13 +89,13 @@ struct simplelock kprintf_slock = SIMPLELOCK_INITIALIZER;
do { \
(s) = splhigh(); \
__cpu_simple_lock(&kprintf_slock.lock_data); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define KPRINTF_MUTEX_EXIT(s) \
do { \
__cpu_simple_unlock(&kprintf_slock.lock_data); \
splx((s)); \
} while (0)
} while (/*CONSTCOND*/ 0)
#else /* ! MULTIPROCESSOR */
#define KPRINTF_MUTEX_ENTER(s) (s) = splhigh()
#define KPRINTF_MUTEX_EXIT(s) splx((s))
@ -807,7 +807,7 @@ bitmask_snprintf(val, p, buf, buflen)
*(b)++ = (c); \
if (--(l) == 0) \
goto out; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define PUTSTR(b, p, l) do { \
int c; \
while ((c = *(p)++) != 0) { \
@ -815,7 +815,7 @@ bitmask_snprintf(val, p, buf, buflen)
if (--(l) == 0) \
goto out; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* Chris Torek's new bitmask format is identified by a leading \177

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_pipe.c,v 1.29 2002/11/01 21:46:51 kristerw Exp $ */
/* $NetBSD: sys_pipe.c,v 1.30 2002/11/02 07:25:23 perry Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.29 2002/11/01 21:46:51 kristerw Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.30 2002/11/02 07:25:23 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -135,13 +135,13 @@ static struct fileops pipeops = {
do { \
PIPE_UNLOCK(wpipe); \
mtx_lock(&Giant); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define PIPE_DROP_GIANT(pipe) \
do { \
mtx_unlock(&Giant); \
PIPE_LOCK(wpipe); \
} while (0)
} while (/*CONSTCOND*/ 0)
#endif /* FreeBSD */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tty_conf.c,v 1.39 2002/09/06 13:18:43 gehenna Exp $ */
/* $NetBSD: tty_conf.c,v 1.40 2002/11/02 07:25:24 perry Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tty_conf.c,v 1.39 2002/09/06 13:18:43 gehenna Exp $");
__KERNEL_RCSID(0, "$NetBSD: tty_conf.c,v 1.40 2002/11/02 07:25:24 perry Exp $");
#include "opt_compat_freebsd.h"
#include "opt_compat_43.h"
@ -290,7 +290,7 @@ ttyldisc_lookup(name)
do { \
if (ttyldisc_add(&(s), (v)) != (v)) \
panic("ttyldisc_init: " __STRING(s)); \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* Register the basic line disciplines.

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.c,v 1.115 2002/09/27 15:37:50 provos Exp $ */
/* $NetBSD: if.c,v 1.116 2002/11/02 07:26:53 perry Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.115 2002/09/27 15:37:50 provos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.116 2002/11/02 07:26:53 perry Exp $");
#include "opt_inet.h"
@ -648,7 +648,7 @@ if_detach(ifp)
do { \
extern struct ifqueue x; \
if_detach_queues(ifp, & x); \
} while (0)
} while (/*CONSTCOND*/ 0)
#ifdef INET
#if NARP > 0
IF_DETACH_QUEUES(arpintrq);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.h,v 1.82 2002/08/26 01:36:37 thorpej Exp $ */
/* $NetBSD: if.h,v 1.83 2002/11/02 07:26:54 perry Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -393,7 +393,7 @@ do { \
else \
m_freem(__m0); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IF_IS_EMPTY(ifq) ((ifq)->ifq_len == 0)
#define IFQ_MAXLEN 50
@ -593,7 +593,7 @@ struct if_laddrreq {
do { \
printf("IFAREF: %s:%d %p -> %d\n", __FILE__, __LINE__, \
(ifa), ++(ifa)->ifa_refcnt); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFAFREE(ifa) \
do { \
@ -604,7 +604,7 @@ do { \
(ifa), --(ifa)->ifa_refcnt); \
if ((ifa)->ifa_refcnt == 0) \
ifafree(ifa); \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define IFAREF(ifa) (ifa)->ifa_refcnt++
@ -616,13 +616,13 @@ do { \
__LINE__, (ifa)); \
if (--(ifa)->ifa_refcnt == 0) \
ifafree(ifa); \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define IFAFREE(ifa) \
do { \
if (--(ifa)->ifa_refcnt == 0) \
ifafree(ifa); \
} while (0)
} while (/*CONSTCOND*/ 0)
#endif /* DIAGNOSTIC */
#endif /* IFAREF_DEBUG */
@ -644,7 +644,7 @@ do { \
} \
if ((err)) \
(ifq)->ifq_drops++; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_DEQUEUE(ifq, m) \
do { \
@ -654,7 +654,7 @@ do { \
ALTQ_DEQUEUE((ifq), (m)); \
else \
IF_DEQUEUE((ifq), (m)); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_POLL(ifq, m) \
do { \
@ -664,7 +664,7 @@ do { \
ALTQ_POLL((ifq), (m)); \
else \
IF_POLL((ifq), (m)); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_PURGE(ifq) \
do { \
@ -672,12 +672,12 @@ do { \
ALTQ_PURGE((ifq)); \
else \
IF_PURGE((ifq)); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_SET_READY(ifq) \
do { \
(ifq)->altq_flags |= ALTQF_READY; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_CLASSIFY(ifq, m, af, pa) \
do { \
@ -688,7 +688,7 @@ do { \
(pa)->pattr_af = (af); \
(pa)->pattr_hdr = mtod((m), caddr_t); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else /* ! ALTQ */
#define ALTQ_DECL(x) /* nothing */
@ -703,7 +703,7 @@ do { \
} \
if ((err)) \
(ifq)->ifq_drops++; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IFQ_DEQUEUE(ifq, m) IF_DEQUEUE((ifq), (m))

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ieee80211.h,v 1.23 2002/10/15 08:51:50 onoe Exp $ */
/* $NetBSD: if_ieee80211.h,v 1.24 2002/11/02 07:26:55 perry Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -482,7 +482,7 @@ struct ieee80211com {
if ((ic)->ic_send_mgmt[(type)>>IEEE80211_FC0_SUBTYPE_SHIFT] != NULL) \
(*(ic)->ic_send_mgmt[(type)>>IEEE80211_FC0_SUBTYPE_SHIFT]) \
(ic,ni,type,arg); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IEEE80211_ADDR_EQ(a1,a2) (memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
#define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.45 2002/09/11 05:36:28 itojun Exp $ */
/* $NetBSD: if_strip.c,v 1.46 2002/11/02 07:26:55 perry Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.45 2002/09/11 05:36:28 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.46 2002/11/02 07:26:55 perry Exp $");
#include "strip.h"
@ -318,7 +318,7 @@ void stripintr(void *);
do {\
(sc)->sc_state = ST_ALIVE; \
(sc)->sc_statetimo = time.tv_sec + ST_PROBE_INTERVAL; \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* we received a response from the radio that indicates it's crashed
@ -329,7 +329,7 @@ void stripintr(void *);
(sc)->sc_statetimo = time.tv_sec - 1; \
(sc)->sc_state = ST_DEAD; \
/*(sc)->sc_if.if_timer = 0;*/ \
} while (0)
} while (/*CONSTCOND*/ 0)
#define RADIO_PROBE_TIMEOUT(sc) \
((sc)-> sc_statetimo > time.tv_sec)

View File

@ -1,4 +1,4 @@
/* $NetBSD: netisr_dispatch.h,v 1.8 2001/10/06 15:46:33 thorpej Exp $ */
/* $NetBSD: netisr_dispatch.h,v 1.9 2002/11/02 07:26:56 perry Exp $ */
/*
* netisr_dispatch: This file is included by the
@ -8,7 +8,7 @@
*
* softintr() {
* ...do setup stuff...
* #define DONETISR(bit, fn) do { ... } while (0)
* #define DONETISR(bit, fn) do { ... } while (/*CONSTCOND*/ 0)
* #include <net/netisr_dispatch.h>
* #undef DONETISR
* ...do cleanup stuff.

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.h,v 1.29 2002/05/12 20:40:12 matt Exp $ */
/* $NetBSD: route.h,v 1.30 2002/11/02 07:26:57 perry Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -274,7 +274,7 @@ do { \
rtfree(rt); \
else \
(rt)->rt_refcnt--; \
} while (0)
} while (/*CONSTCOND*/ 0)
extern struct route_cb route_cb;
extern struct rtstat rtstat;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtsock.c,v 1.55 2002/02/22 17:26:31 christos Exp $ */
/* $NetBSD: rtsock.c,v 1.56 2002/11/02 07:26:57 perry Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.55 2002/02/22 17:26:31 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.56 2002/11/02 07:26:57 perry Exp $");
#include "opt_inet.h"
@ -223,7 +223,7 @@ route_output(m, va_alist)
so = va_arg(ap, struct socket *);
va_end(ap);
#define senderr(e) do { error = e; goto flush;} while (0)
#define senderr(e) do { error = e; goto flush;} while (/*CONSTCOND*/ 0)
if (m == 0 || ((m->m_len < sizeof(int32_t)) &&
(m = m_pullup(m, sizeof(int32_t))) == 0))
return (ENOBUFS);

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.h,v 1.24 2002/06/09 16:33:37 itojun Exp $ */
/* $NetBSD: icmp6.h,v 1.25 2002/11/02 07:28:10 perry Exp $ */
/* $KAME: icmp6.h,v 1.39 2001/02/06 03:48:06 itojun Exp $ */
/*
@ -464,7 +464,7 @@ do { \
p = (u_char *)filterp; \
for (i = 0; i < sizeof(struct icmp6_filter); i++) \
p[i] = 0xff; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define ICMP6_FILTER_SETBLOCKALL(filterp) \
bzero(filterp, sizeof(struct icmp6_filter))
#else /* _KERNEL */
@ -626,7 +626,7 @@ void icmp6_mtudisc_callback_register __P((void (*)(struct in6_addr *)));
do { \
if (ifp) \
((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat->tag++; \
} while (0)
} while (/*CONSTCOND*/ 0)
#define icmp6_ifoutstat_inc(ifp, type, code) \
do { \
@ -677,7 +677,7 @@ do { \
icmp6_ifstat_inc(ifp, ifs6_out_redirect); \
break; \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
extern int icmp6_rediraccept; /* accept/process redirects */
extern int icmp6_redirtimeout; /* cache time for redirect routes */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arp.c,v 1.89 2002/06/25 04:16:31 enami Exp $ */
/* $NetBSD: if_arp.c,v 1.90 2002/11/02 07:28:11 perry Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.89 2002/06/25 04:16:31 enami Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.90 2002/11/02 07:28:11 perry Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@ -286,14 +286,14 @@ do { \
printf("%s:%d: arp already locked\n", __FILE__, __LINE__); \
panic("arp_lock"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define ARP_LOCK_CHECK() \
do { \
if (arp_locked == 0) { \
printf("%s:%d: arp lock not held\n", __FILE__, __LINE__); \
panic("arp lock check"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define ARP_LOCK(x) (void) arp_lock_try(x)
#define ARP_LOCK_CHECK() /* nothing */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6.h,v 1.12 2001/07/05 23:41:07 itojun Exp $ */
/* $NetBSD: ip6.h,v 1.13 2002/11/02 07:28:12 perry Exp $ */
/* $KAME: ip6.h,v 1.14 2000/10/09 01:04:09 itojun Exp $ */
/*
@ -245,7 +245,7 @@ do { \
return ret; \
} \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to
@ -274,7 +274,7 @@ do { \
(m) = NULL; \
} \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IP6_EXTHDR_GET0(val, typ, m, off, len) \
do { \
@ -292,7 +292,7 @@ do { \
(m) = NULL; \
} \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#endif /*_KERNEL*/
#endif /* not _NETINET_IP6_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_flow.c,v 1.25 2002/06/30 22:40:34 thorpej Exp $ */
/* $NetBSD: ip_flow.c,v 1.26 2002/11/02 07:28:12 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.25 2002/06/30 22:40:34 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_flow.c,v 1.26 2002/11/02 07:28:12 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -80,13 +80,13 @@ static int ipflow_inuse;
do { \
LIST_INSERT_HEAD((bucket), (ipf), ipf_hash); \
LIST_INSERT_HEAD(&ipflowlist, (ipf), ipf_list); \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IPFLOW_REMOVE(ipf) \
do { \
LIST_REMOVE((ipf), ipf_hash); \
LIST_REMOVE((ipf), ipf_list); \
} while (0)
} while (/*CONSTCOND*/ 0)
#ifndef IPFLOW_MAX
#define IPFLOW_MAX 256

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_input.c,v 1.158 2002/09/23 13:43:27 itojun Exp $ */
/* $NetBSD: ip_input.c,v 1.159 2002/11/02 07:28:12 perry Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.158 2002/09/23 13:43:27 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.159 2002/11/02 07:28:12 perry Exp $");
#include "opt_gateway.h"
#include "opt_pfil_hooks.h"
@ -257,14 +257,14 @@ do { \
printf("%s:%d: ipq already locked\n", __FILE__, __LINE__); \
panic("ipq_lock"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define IPQ_LOCK_CHECK() \
do { \
if (ipq_locked == 0) { \
printf("%s:%d: ipq lock not held\n", __FILE__, __LINE__); \
panic("ipq lock check"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define IPQ_LOCK() (void) ipq_lock_try()
#define IPQ_LOCK_CHECK() /* nothing */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_mroute.c,v 1.62 2002/08/14 00:23:31 itojun Exp $ */
/* $NetBSD: ip_mroute.c,v 1.63 2002/11/02 07:28:13 perry Exp $ */
/*
* Copyright (c) 1989 Stephen Deering
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.62 2002/08/14 00:23:31 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.63 2002/11/02 07:28:13 perry Exp $");
#include "opt_ipsec.h"
@ -92,7 +92,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.62 2002/08/14 00:23:31 itojun Exp $"
do { \
if ((m) && ((m)->m_flags & M_EXT || (m)->m_len < (len))) \
(m) = m_pullup((m), (len)); \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* Globals. All but ip_mrouter and ip_mrtproto could be static,

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_input.c,v 1.158 2002/10/22 04:24:50 thorpej Exp $ */
/* $NetBSD: tcp_input.c,v 1.159 2002/11/02 07:28:14 perry Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -152,7 +152,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.158 2002/10/22 04:24:50 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.159 2002/11/02 07:28:14 perry Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -245,7 +245,7 @@ do { \
&& tp->t_in6pcb->in6p_route.ro_rt) { \
nd6_nud_hint(tp->t_in6pcb->in6p_route.ro_rt, NULL, 0); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define ND6_HINT(tp)
#endif
@ -263,7 +263,7 @@ do { \
tp->t_flags |= TF_ACKNOW; \
else \
TCP_SET_DELACK(tp); \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* Convert TCP protocol fields to host order for easier processing.
@ -274,7 +274,7 @@ do { \
NTOHL((th)->th_ack); \
NTOHS((th)->th_win); \
NTOHS((th)->th_urp); \
} while (0)
} while (/*CONSTCOND*/ 0)
/*
* ... and reverse the above.
@ -285,7 +285,7 @@ do { \
HTONL((th)->th_ack); \
HTONS((th)->th_win); \
HTONS((th)->th_urp); \
} while (0)
} while (/*CONSTCOND*/ 0)
#ifdef TCP_CSUM_COUNTERS
#include <sys/device.h>
@ -2828,7 +2828,7 @@ do { \
hash = SYN_HASH(&((struct sockaddr_in *)(src))->sin_addr, \
((struct sockaddr_in *)(src))->sin_port, \
((struct sockaddr_in *)(dst))->sin_port); \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define SYN_HASH6(sa, sp, dp) \
((((sa)->s6_addr32[0] ^ (sa)->s6_addr32[3] ^ syn_hash1) * \

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_var.h,v 1.93 2002/06/30 22:40:36 thorpej Exp $ */
/* $NetBSD: tcp_var.h,v 1.94 2002/11/02 07:28:15 perry Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -310,7 +310,7 @@ do { \
__FILE__, __LINE__, tp); \
panic("tcp_reass_lock"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#define TCP_REASS_LOCK_CHECK(tp) \
do { \
if (((tp)->t_flags & TF_REASSEMBLING) == 0) { \
@ -318,7 +318,7 @@ do { \
__FILE__, __LINE__, tp); \
panic("tcp reass lock check"); \
} \
} while (0)
} while (/*CONSTCOND*/ 0)
#else
#define TCP_REASS_LOCK(tp) (void) tcp_reass_lock_try((tp))
#define TCP_REASS_LOCK_CHECK(tp) /* nothing */