From owner-svn-src-head@freebsd.org Sat Dec 14 00:43:18 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9077E1DB83B; Sat, 14 Dec 2019 00:43:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47ZTKf3JQwz3Fj6; Sat, 14 Dec 2019 00:43:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C1841CA56; Sat, 14 Dec 2019 00:43:18 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBE0hI3P054786; Sat, 14 Dec 2019 00:43:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBE0hIXa054784; Sat, 14 Dec 2019 00:43:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201912140043.xBE0hIXa054784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 14 Dec 2019 00:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355742 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 355742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2019 00:43:18 -0000 Author: mjg Date: Sat Dec 14 00:43:17 2019 New Revision: 355742 URL: https://svnweb.freebsd.org/changeset/base/355742 Log: Remove the useless return value from proc_set_cred Modified: head/sys/kern/kern_prot.c head/sys/sys/ucred.h Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Fri Dec 13 23:46:59 2019 (r355741) +++ head/sys/kern/kern_prot.c Sat Dec 14 00:43:17 2019 (r355742) @@ -1995,10 +1995,9 @@ proc_set_cred_init(struct proc *p, struct ucred *newcr * only used when the process is about to be freed, at which point it should * not be visible anymore). */ -struct ucred * +void proc_set_cred(struct proc *p, struct ucred *newcred) { - struct ucred *oldcred; MPASS(p->p_ucred != NULL); if (newcred == NULL) @@ -2006,11 +2005,9 @@ proc_set_cred(struct proc *p, struct ucred *newcred) else PROC_LOCK_ASSERT(p, MA_OWNED); - oldcred = p->p_ucred; p->p_ucred = newcred; if (newcred != NULL) PROC_UPDATE_COW(p); - return (oldcred); } struct ucred * Modified: head/sys/sys/ucred.h ============================================================================== --- head/sys/sys/ucred.h Fri Dec 13 23:46:59 2019 (r355741) +++ head/sys/sys/ucred.h Sat Dec 14 00:43:17 2019 (r355742) @@ -112,7 +112,7 @@ struct ucred *crcopysafe(struct proc *p, struct ucred struct ucred *crdup(struct ucred *cr); void crextend(struct ucred *cr, int n); void proc_set_cred_init(struct proc *p, struct ucred *cr); -struct ucred *proc_set_cred(struct proc *p, struct ucred *cr); +void proc_set_cred(struct proc *p, struct ucred *cr); void crfree(struct ucred *cr); struct ucred *crget(void); struct ucred *crhold(struct ucred *cr);