while (0); -> while (0) in multi-line macros

This commit is contained in:
Warner Losh 2006-08-17 22:50:33 +00:00
parent c487be961a
commit 1a3c917f9d
7 changed files with 7 additions and 8 deletions

View File

@ -45,7 +45,7 @@ struct timeval32 {
#define TV_CP(src,dst,fld) do { \
CP((src).fld,(dst).fld,tv_sec); \
CP((src).fld,(dst).fld,tv_usec); \
} while (0);
} while (0)
struct timespec32 {
u_int32_t tv_sec;

View File

@ -1257,8 +1257,7 @@ typedef struct work_queue_item work_queue_item;
(w)->wqi_func = (func); \
(w)->wqi_ctx = (ctx); \
InitializeListHead(&((w)->wqi_entry)); \
} while (0); \
} while (0)
/*
* FreeBSD's kernel stack is 2 pages in size by default. The

View File

@ -322,7 +322,7 @@ struct arl_softc {
for (i = cnt; i && ar->resetFlag; i--) { \
DELAY(delay); \
} \
} while (0);
} while (0)
#ifdef _KERNEL
void arl_release_resources (device_t);

View File

@ -149,7 +149,7 @@ struct ath_txq {
snprintf((_tq)->axq_name, sizeof((_tq)->axq_name), "%s_txq%u", \
device_get_nameunit((_sc)->sc_dev), (_tq)->axq_qnum); \
mtx_init(&(_tq)->axq_lock, (_tq)->axq_name, "ath_txq", MTX_DEF); \
} while (0);
} while (0)
#define ATH_TXQ_LOCK_DESTROY(_tq) mtx_destroy(&(_tq)->axq_lock)
#define ATH_TXQ_LOCK(_tq) mtx_lock(&(_tq)->axq_lock)
#define ATH_TXQ_UNLOCK(_tq) mtx_unlock(&(_tq)->axq_lock)

View File

@ -74,7 +74,7 @@ MALLOC_DECLARE(M_IPSBUF);
#define ips_set_error(command, error) do { \
(command)->status.fields.basic_status = IPS_DRV_ERROR; \
(command)->status.fields.reserved = ((error) & 0x0f); \
} while (0);
} while (0)
#ifndef IPS_DEBUG
#define DEVICE_PRINTF(x...)

View File

@ -241,7 +241,7 @@ struct denode {
(dep)->de_flag |= DE_MODIFIED; \
} \
(dep)->de_flag &= ~(DE_UPDATE | DE_CREATE | DE_ACCESS); \
} while (0);
} while (0)
/*
* This overlays the fid structure (see mount.h)

View File

@ -45,7 +45,7 @@
pbp = pbp->bio_caller1; \
pbp->bio_caller1 = cbp; \
} \
} while (0);
} while (0)
struct gv_raid5_packet {
caddr_t data; /* Data buffer of this sub-request- */