svn commit: r355742 - in head/sys: kern sys
Mateusz Guzik
mjg at FreeBSD.org
Sat Dec 14 00:43:18 UTC 2019
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);
More information about the svn-src-all
mailing list