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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to