Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 2015 11:11:02 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285810 - head/sys/sys
Message-ID:  <201507231111.t6NBB2Ki006645@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Thu Jul 23 11:11:01 2015
New Revision: 285810
URL: https://svnweb.freebsd.org/changeset/base/285810

Log:
  Allow cap_rights_{set,clear,is_set} to be called with no arguments.
  
  In the CloudABI code I sometimes call into cap_rights_* without
  providing any arguments. Though one could argue that this doesn't make
  sense, in this specific case it's hard to avoid, as the rights that
  should be tested against are forwarded by a couple of wrapper macros.

Modified:
  head/sys/sys/capsicum.h

Modified: head/sys/sys/capsicum.h
==============================================================================
--- head/sys/sys/capsicum.h	Thu Jul 23 05:26:09 2015	(r285809)
+++ head/sys/sys/capsicum.h	Thu Jul 23 11:11:01 2015	(r285810)
@@ -315,16 +315,16 @@ __BEGIN_DECLS
 	__cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL)
 cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...);
 
-#define	cap_rights_set(rights, ...)					\
-	__cap_rights_set((rights), __VA_ARGS__, 0ULL)
+#define	cap_rights_set(...)						\
+	__cap_rights_set(__VA_ARGS__, 0ULL)
 cap_rights_t *__cap_rights_set(cap_rights_t *rights, ...);
 
-#define	cap_rights_clear(rights, ...)					\
-	__cap_rights_clear((rights), __VA_ARGS__, 0ULL)
+#define	cap_rights_clear(...)						\
+	__cap_rights_clear(__VA_ARGS__, 0ULL)
 cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...);
 
-#define	cap_rights_is_set(rights, ...)					\
-	__cap_rights_is_set((rights), __VA_ARGS__, 0ULL)
+#define	cap_rights_is_set(...)						\
+	__cap_rights_is_set(__VA_ARGS__, 0ULL)
 bool __cap_rights_is_set(const cap_rights_t *rights, ...);
 
 bool cap_rights_is_valid(const cap_rights_t *rights);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507231111.t6NBB2Ki006645>