svn commit: r285810 - head/sys/sys
Ed Schouten
ed at FreeBSD.org
Thu Jul 23 11:11:02 UTC 2015
Author: ed
Date: Thu Jul 23 11:11:01 2015
New Revision: 285810
URL: https://svnweb.freebsd.org/changeset/base/285810
Log:
Allow cap_rights_{set,clear,is_set} to be called with no arguments.
In the CloudABI code I sometimes call into cap_rights_* without
providing any arguments. Though one could argue that this doesn't make
sense, in this specific case it's hard to avoid, as the rights that
should be tested against are forwarded by a couple of wrapper macros.
Modified:
head/sys/sys/capsicum.h
Modified: head/sys/sys/capsicum.h
==============================================================================
--- head/sys/sys/capsicum.h Thu Jul 23 05:26:09 2015 (r285809)
+++ head/sys/sys/capsicum.h Thu Jul 23 11:11:01 2015 (r285810)
@@ -315,16 +315,16 @@ __BEGIN_DECLS
__cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL)
cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...);
-#define cap_rights_set(rights, ...) \
- __cap_rights_set((rights), __VA_ARGS__, 0ULL)
+#define cap_rights_set(...) \
+ __cap_rights_set(__VA_ARGS__, 0ULL)
cap_rights_t *__cap_rights_set(cap_rights_t *rights, ...);
-#define cap_rights_clear(rights, ...) \
- __cap_rights_clear((rights), __VA_ARGS__, 0ULL)
+#define cap_rights_clear(...) \
+ __cap_rights_clear(__VA_ARGS__, 0ULL)
cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...);
-#define cap_rights_is_set(rights, ...) \
- __cap_rights_is_set((rights), __VA_ARGS__, 0ULL)
+#define cap_rights_is_set(...) \
+ __cap_rights_is_set(__VA_ARGS__, 0ULL)
bool __cap_rights_is_set(const cap_rights_t *rights, ...);
bool cap_rights_is_valid(const cap_rights_t *rights);
More information about the svn-src-head
mailing list