From owner-svn-src-all@FreeBSD.ORG Thu Nov 14 22:59:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93662778; Thu, 14 Nov 2013 22:59:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 685732568; Thu, 14 Nov 2013 22:59:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAEMxLaq026286; Thu, 14 Nov 2013 22:59:21 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAEMxLRf026284; Thu, 14 Nov 2013 22:59:21 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311142259.rAEMxLRf026284@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 14 Nov 2013 22:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258149 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 22:59:21 -0000 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