summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2003-02-02 19:39:51 +0000
committernectar <nectar@FreeBSD.org>2003-02-02 19:39:51 +0000
commitdd9e20c419d0851d61227dfd736ee927304b10bb (patch)
treebb9afd181c8d224dc8bd491146c532c2e363c38f
parent43d52f88dc35f34cdbc8a753986ed08c92f053c9 (diff)
downloadFreeBSD-src-dd9e20c419d0851d61227dfd736ee927304b10bb.zip
FreeBSD-src-dd9e20c419d0851d61227dfd736ee927304b10bb.tar.gz
Tweak the definition of the EV_SET macro so that it evaluates each
of its arguments exactly once. (Previously it evaluated the first argument six times.) MFC after: 1 week
-rw-r--r--sys/sys/event.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h
index b4ca6b6..900089c 100644
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -40,7 +40,8 @@
#define EVFILT_SYSCOUNT 8
-#define EV_SET(kevp, a, b, c, d, e, f) do { \
+#define EV_SET(kevp_, a, b, c, d, e, f) do { \
+ struct kevent *kevp = (kevp_); \
(kevp)->ident = (a); \
(kevp)->filter = (b); \
(kevp)->flags = (c); \
OpenPOWER on IntegriCloud