diff options
author | tedu <tedu@openbsd.org> | 2017-05-31 07:12:28 +0000 |
---|---|---|
committer | tedu <tedu@openbsd.org> | 2017-05-31 07:12:28 +0000 |
commit | aafd89408ca7f6bd92d3a9c1185fca8d5accb4d9 (patch) | |
tree | 396c4a0f6b52db8e16339b3896177ff1528d40be /sys/sys/event.h | |
parent | remove now obsolete ctx from ssh_dispatch_run; ok djm@ (diff) | |
download | wireguard-openbsd-aafd89408ca7f6bd92d3a9c1185fca8d5accb4d9.tar.xz wireguard-openbsd-aafd89408ca7f6bd92d3a9c1185fca8d5accb4d9.zip |
make a copy of the first EV_SET argument to prevent multiple evaluation.
matches freebsd, fixes lldb. from Kamil Rytarowski at NetBSD.
while here, make the same change to KNOTE. ok deraadt
Diffstat (limited to 'sys/sys/event.h')
-rw-r--r-- | sys/sys/event.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h index b238958dcfd..13b370b4c40 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,4 +1,4 @@ -/* $OpenBSD: event.h,v 1.23 2016/09/24 18:39:17 tedu Exp $ */ +/* $OpenBSD: event.h,v 1.24 2017/05/31 07:12:28 tedu Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -41,7 +41,8 @@ #define EVFILT_SYSCOUNT 7 -#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); \ @@ -118,7 +119,8 @@ SLIST_HEAD(klist, knote); #ifdef _KERNEL -#define KNOTE(list, hint) do { \ +#define KNOTE(list_, hint) do { \ + struct klist *list = (list_); \ if ((list) != NULL) \ knote((list), (hint)); \ } while (0) |