Remove the useless return value from proc_set_cred

This commit is contained in:
Mateusz Guzik 2019-12-14 00:43:17 +00:00
parent 97faa4c470
commit 6f836483ec
2 changed files with 2 additions and 5 deletions

View File

@ -1995,10 +1995,9 @@ proc_set_cred_init(struct proc *p, struct ucred *newcred)
* 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 *

View File

@ -112,7 +112,7 @@ struct ucred *crcopysafe(struct proc *p, struct ucred *cr);
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);