Use binary and (&) instead of logical to extract the mask of a capability.
CID: 1365227 Submitted by: cem
This commit is contained in:
parent
0a33140d06
commit
8368d90bfc
@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_long flags, u_long *rem)
|
||||
}
|
||||
|
||||
/* XXX: This should be in <sys/capsicum.h> */
|
||||
#define CAPMASK(right) ((right) && (((uint64_t)1 << 57) - 1))
|
||||
#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1))
|
||||
|
||||
void
|
||||
sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user