Use binary and (&) instead of logical to extract the mask of a capability.

CID:		1365227
Submitted by:	cem
This commit is contained in:
John Baldwin 2016-10-25 18:45:14 +00:00
parent 0a33140d06
commit 8368d90bfc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307948

View File

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