svn commit: r307948 - head/lib/libsysdecode

John Baldwin jhb at FreeBSD.org
Tue Oct 25 18:45:15 UTC 2016


Author: jhb
Date: Tue Oct 25 18:45:14 2016
New Revision: 307948
URL: https://svnweb.freebsd.org/changeset/base/307948

Log:
  Use binary and (&) instead of logical to extract the mask of a capability.
  
  CID:		1365227
  Submitted by:	cem

Modified:
  head/lib/libsysdecode/flags.c

Modified: head/lib/libsysdecode/flags.c
==============================================================================
--- head/lib/libsysdecode/flags.c	Tue Oct 25 18:43:36 2016	(r307947)
+++ head/lib/libsysdecode/flags.c	Tue Oct 25 18:45:14 2016	(r307948)
@@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_
 }
 
 /* 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)


More information about the svn-src-head mailing list