Date: Tue, 25 Oct 2016 18:45:14 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307948 - head/lib/libsysdecode Message-ID: <201610251845.u9PIjEJ0011685@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610251845.u9PIjEJ0011685>