Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2013 22:59:21 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r258149 - in head/sys: kern sys
Message-ID:  <201311142259.rAEMxLRf026284@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Thu Nov 14 22:59:20 2013
New Revision: 258149
URL: http://svnweb.freebsd.org/changeset/base/258149

Log:
  Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer
  to the destination cap_rights_t structure.
  
  This already matches manual page.
  
  MFC after:	3 days

Modified:
  head/sys/kern/subr_capability.c
  head/sys/sys/capability.h

Modified: head/sys/kern/subr_capability.c
==============================================================================
--- head/sys/kern/subr_capability.c	Thu Nov 14 22:57:07 2013	(r258148)
+++ head/sys/kern/subr_capability.c	Thu Nov 14 22:59:20 2013	(r258149)
@@ -168,7 +168,7 @@ __cap_rights_init(int version, cap_right
 	return (rights);
 }
 
-void
+cap_rights_t *
 __cap_rights_set(cap_rights_t *rights, ...)
 {
 	va_list ap;
@@ -178,9 +178,11 @@ __cap_rights_set(cap_rights_t *rights, .
 	va_start(ap, rights);
 	cap_rights_vset(rights, ap);
 	va_end(ap);
+
+	return (rights);
 }
 
-void
+cap_rights_t *
 __cap_rights_clear(cap_rights_t *rights, ...)
 {
 	va_list ap;
@@ -190,6 +192,8 @@ __cap_rights_clear(cap_rights_t *rights,
 	va_start(ap, rights);
 	cap_rights_vclear(rights, ap);
 	va_end(ap);
+
+	return (rights);
 }
 
 bool
@@ -235,7 +239,7 @@ cap_rights_is_valid(const cap_rights_t *
 	return (true);
 }
 
-void
+cap_rights_t *
 cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src)
 {
 	unsigned int i, n;
@@ -254,9 +258,11 @@ cap_rights_merge(cap_rights_t *dst, cons
 
 	assert(cap_rights_is_valid(src));
 	assert(cap_rights_is_valid(dst));
+
+	return (dst);
 }
 
-void
+cap_rights_t *
 cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src)
 {
 	unsigned int i, n;
@@ -277,6 +283,8 @@ cap_rights_remove(cap_rights_t *dst, con
 
 	assert(cap_rights_is_valid(src));
 	assert(cap_rights_is_valid(dst));
+
+	return (dst);
 }
 
 bool

Modified: head/sys/sys/capability.h
==============================================================================
--- head/sys/sys/capability.h	Thu Nov 14 22:57:07 2013	(r258148)
+++ head/sys/sys/capability.h	Thu Nov 14 22:59:20 2013	(r258149)
@@ -269,8 +269,8 @@ void __cap_rights_clear(cap_rights_t *ri
 bool __cap_rights_is_set(const cap_rights_t *rights, ...);
 
 bool cap_rights_is_valid(const cap_rights_t *rights);
-void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
-void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
+cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
+cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
 bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
 
 #ifdef _KERNEL



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