diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-04-04 08:57:37 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-04-04 08:57:37 +0000 |
commit | d071b87d85b9808da010c13eb652311fe32a0a18 (patch) | |
tree | d36abe1a04e5abfbbf09de130acc42454f1272f2 | |
parent | 47c0808540df8939fcfef024bfb2c57f9b1a8d7b (diff) |
Prevent shadowing of local variable by the EV_SET() macro.
Use two underbars to start the locally defined variable, as suggested by
guenther@. The other option to avoid namespace conflict would be to start
the identifier with an underbar and a capital.
ok beck@, guenther@
-rw-r--r-- | sys/sys/event.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h index c54ee63e842..7d66820a65f 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -1,4 +1,4 @@ -/* $OpenBSD: event.h,v 1.33 2020/02/20 16:56:52 visa Exp $ */ +/* $OpenBSD: event.h,v 1.34 2020/04/04 08:57:36 mpi Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -42,14 +42,14 @@ #define EVFILT_SYSCOUNT 8 -#define EV_SET(kevp_, a, b, c, d, e, f) do { \ - struct kevent *kevp = (kevp_); \ - (kevp)->ident = (a); \ - (kevp)->filter = (b); \ - (kevp)->flags = (c); \ - (kevp)->fflags = (d); \ - (kevp)->data = (e); \ - (kevp)->udata = (f); \ +#define EV_SET(kevp, a, b, c, d, e, f) do { \ + struct kevent *__kevp = (kevp); \ + (__kevp)->ident = (a); \ + (__kevp)->filter = (b); \ + (__kevp)->flags = (c); \ + (__kevp)->fflags = (d); \ + (__kevp)->data = (e); \ + (__kevp)->udata = (f); \ } while(0) struct kevent { |