summaryrefslogtreecommitdiffstats
path: root/sys/sys/event.h
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2008-11-05 09:20:17 +0000
committerdlg <dlg@openbsd.org>2008-11-05 09:20:17 +0000
commitad3d84860a1196a9126dcd8750c1e8dd9e399099 (patch)
tree0cef413741a8cd57b66050bef6e1beeeb741d84e /sys/sys/event.h
parentwrap an if statement in a macro up with do { } while (0) so it is safe to (diff)
downloadwireguard-openbsd-ad3d84860a1196a9126dcd8750c1e8dd9e399099.tar.xz
wireguard-openbsd-ad3d84860a1196a9126dcd8750c1e8dd9e399099.zip
wrap use of KNOTE macro arguments in () to prevent potential strange
expansion. requested by otto@
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r--sys/sys/event.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h
index 38f0e89e5f8..0076d1b590c 100644
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: event.h,v 1.12 2008/11/05 09:07:56 dlg Exp $ */
+/* $OpenBSD: event.h,v 1.13 2008/11/05 09:20:17 dlg Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
@@ -120,7 +120,7 @@ SLIST_HEAD(klist, knote);
#define KNOTE(list, hint) do { \
if ((list) != NULL) \
- knote(list, hint); \
+ knote((list), (hint)); \
} while (0)
/*