Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
to the destination cap_rights_t structure. This already matches manual page. MFC after: 3 days
This commit is contained in:
parent
98b74f0d1d
commit
d673cd358c
@ -168,7 +168,7 @@ __cap_rights_init(int version, cap_rights_t *rights, ...)
|
||||
return (rights);
|
||||
}
|
||||
|
||||
void
|
||||
cap_rights_t *
|
||||
__cap_rights_set(cap_rights_t *rights, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -178,9 +178,11 @@ __cap_rights_set(cap_rights_t *rights, ...)
|
||||
va_start(ap, rights);
|
||||
cap_rights_vset(rights, ap);
|
||||
va_end(ap);
|
||||
|
||||
return (rights);
|
||||
}
|
||||
|
||||
void
|
||||
cap_rights_t *
|
||||
__cap_rights_clear(cap_rights_t *rights, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -190,6 +192,8 @@ __cap_rights_clear(cap_rights_t *rights, ...)
|
||||
va_start(ap, rights);
|
||||
cap_rights_vclear(rights, ap);
|
||||
va_end(ap);
|
||||
|
||||
return (rights);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -235,7 +239,7 @@ cap_rights_is_valid(const cap_rights_t *rights)
|
||||
return (true);
|
||||
}
|
||||
|
||||
void
|
||||
cap_rights_t *
|
||||
cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src)
|
||||
{
|
||||
unsigned int i, n;
|
||||
@ -254,9 +258,11 @@ cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src)
|
||||
|
||||
assert(cap_rights_is_valid(src));
|
||||
assert(cap_rights_is_valid(dst));
|
||||
|
||||
return (dst);
|
||||
}
|
||||
|
||||
void
|
||||
cap_rights_t *
|
||||
cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src)
|
||||
{
|
||||
unsigned int i, n;
|
||||
@ -277,6 +283,8 @@ cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src)
|
||||
|
||||
assert(cap_rights_is_valid(src));
|
||||
assert(cap_rights_is_valid(dst));
|
||||
|
||||
return (dst);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -269,8 +269,8 @@ void __cap_rights_clear(cap_rights_t *rights, ...);
|
||||
bool __cap_rights_is_set(const cap_rights_t *rights, ...);
|
||||
|
||||
bool cap_rights_is_valid(const cap_rights_t *rights);
|
||||
void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
|
||||
void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
|
||||
cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
|
||||
cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
|
||||
bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
Loading…
Reference in New Issue
Block a user