diff options
author | John Baldwin <jhb@FreeBSD.org> | 2016-10-25 18:45:14 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2016-10-25 18:45:14 +0000 |
commit | 8368d90bfceb421309fb8a0db0f588e7193ee6ba (patch) | |
tree | e4a8c58a3b55252744e405b0a766a7418a6cdfb8 /lib/libsysdecode/flags.c | |
parent | 0a33140d0697deac2fb0af3fb92c6b9b72d049c7 (diff) | |
download | src-8368d90bfceb421309fb8a0db0f588e7193ee6ba.tar.gz src-8368d90bfceb421309fb8a0db0f588e7193ee6ba.zip |
Use binary and (&) instead of logical to extract the mask of a capability.
CID: 1365227
Submitted by: cem
Notes
Notes:
svn path=/head/; revision=307948
Diffstat (limited to 'lib/libsysdecode/flags.c')
-rw-r--r-- | lib/libsysdecode/flags.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index 3a705c7e9c5f..653b522b3c08 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -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) |