Module Name: src
Committed By: christos
Date: Wed Jun 14 16:37:05 UTC 2017
Modified Files:
src/sys/sys: event.h
Log Message:
- cast ident argument because it is usually an fd (signed) and generates
conversion to unsigned warnings.
While here:
- name the macro parameters with meaningful names
- rename the internal inline function as _FOO instead of FOO_ because there
is no other FOO_ name in the system headers.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/sys/event.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/event.h
diff -u src/sys/sys/event.h:1.28 src/sys/sys/event.h:1.29
--- src/sys/sys/event.h:1.28 Fri Jun 2 15:44:06 2017
+++ src/sys/sys/event.h Wed Jun 14 12:37:05 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: event.h,v 1.28 2017/06/02 19:44:06 kamil Exp $ */
+/* $NetBSD: event.h,v 1.29 2017/06/14 16:37:05 christos Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <[email protected]>
@@ -54,12 +54,13 @@ struct kevent {
intptr_t udata; /* opaque user data identifier */
};
-#define EV_SET(kevp, a, b, c, d, e, f) \
- EV_SET_((kevp), (a), (b), (c), (d), (e), __CAST(intptr_t, (f)))
+#define EV_SET(kevp, ident, filter, flags, fflags, data, udata) \
+ _EV_SET((kevp), __CAST(uintptr_t, (ident)), (filter), (flags), \
+ (fflags), (data), __CAST(intptr_t, (udata)))
static __inline void
-EV_SET_(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
- uint32_t _flags, uint32_t _fflags, int64_t _data, intptr_t _udata)
+_EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
+ uint32_t _flags, uint32_t _fflags, int64_t _data, intptr_t _udata)
{
_kevp->ident = _ident;
_kevp->filter = _filter;