diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-07 02:23:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-07 02:23:05 +0000 |
commit | fdfb3d891938e664120b732450688f423037f087 (patch) | |
tree | 409be7bb9b1b9fff21b39a07435c3a10a3a5ca39 | |
parent | b51fdc221de23a1a01a7143e381b35a38371ad8e (diff) |
wrap do/while construct around the function macro DISPATCH(); ok dlg
-rw-r--r-- | sys/sys/lkm.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/lkm.h b/sys/sys/lkm.h index e5177a1a4d3..15023091ca7 100644 --- a/sys/sys/lkm.h +++ b/sys/sys/lkm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: lkm.h,v 1.12 2007/11/03 22:23:35 mikeb Exp $ */ +/* $OpenBSD: lkm.h,v 1.13 2008/11/07 02:23:04 deraadt Exp $ */ /* $NetBSD: lkm.h,v 1.12 1996/02/09 18:25:13 christos Exp $ */ /* @@ -253,7 +253,7 @@ extern int lkmdispatch(struct lkm_table *, int); * be specified. "cmd" is passed to each function so that a single * function can be used if desired. */ -#define DISPATCH(lkmtp,cmd,ver,load,unload,stat) \ +#define DISPATCH(lkmtp,cmd,ver,load,unload,stat) do { \ if (ver != LKM_VERSION) \ return EINVAL; /* version mismatch */ \ switch (cmd) { \ @@ -272,7 +272,8 @@ extern int lkmdispatch(struct lkm_table *, int); return error; \ break; \ } \ - return lkmdispatch(lkmtp, cmd); + return lkmdispatch(lkmtp, cmd); \ +} while (/* CONSTCOND */ 0) extern struct vm_map *lkm_map; |