From 1a3c917f9d8daf9ad673c264a2e0fe0025109d0e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 17 Aug 2006 22:50:33 +0000 Subject: [PATCH] while (0); -> while (0) in multi-line macros --- sys/compat/freebsd32/freebsd32.h | 2 +- sys/compat/ndis/ntoskrnl_var.h | 3 +-- sys/dev/arl/if_arlreg.h | 2 +- sys/dev/ath/if_athvar.h | 2 +- sys/dev/ips/ips.h | 2 +- sys/fs/msdosfs/denode.h | 2 +- sys/geom/vinum/geom_vinum_raid5.h | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 806b2ffc6d94..cea86873b25f 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -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; diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h index 01caaede7f1e..751f6aa37b15 100644 --- a/sys/compat/ndis/ntoskrnl_var.h +++ b/sys/compat/ndis/ntoskrnl_var.h @@ -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 diff --git a/sys/dev/arl/if_arlreg.h b/sys/dev/arl/if_arlreg.h index 49982cb41687..161ee461a1dc 100644 --- a/sys/dev/arl/if_arlreg.h +++ b/sys/dev/arl/if_arlreg.h @@ -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); diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h index b96c0628e3ba..46f7308ba55b 100644 --- a/sys/dev/ath/if_athvar.h +++ b/sys/dev/ath/if_athvar.h @@ -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) diff --git a/sys/dev/ips/ips.h b/sys/dev/ips/ips.h index 4df3f2d59f81..1b32164d9065 100644 --- a/sys/dev/ips/ips.h +++ b/sys/dev/ips/ips.h @@ -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...) diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index cbba8e79af11..d77d8e121f3b 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -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) diff --git a/sys/geom/vinum/geom_vinum_raid5.h b/sys/geom/vinum/geom_vinum_raid5.h index 747307d05d80..804920eff434 100644 --- a/sys/geom/vinum/geom_vinum_raid5.h +++ b/sys/geom/vinum/geom_vinum_raid5.h @@ -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- */