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.
This commit is contained in:
Ed Schouten 2015-07-23 11:11:01 +00:00
parent 1c1ddc0351
commit cf6b9e9b07

View File

@ -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);