Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Apr 2011 13:26:22 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Edward Tomasz Napierala <trasz@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r220388 - in head/sys: kern sys
Message-ID:  <201104061326.22743.jhb@freebsd.org>
In-Reply-To: <201104061659.p36GxtjJ099011@svn.freebsd.org>
References:  <201104061659.p36GxtjJ099011@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, April 06, 2011 12:59:55 pm Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Wed Apr  6 16:59:54 2011
> New Revision: 220388
> URL: http://svn.freebsd.org/changeset/base/220388
> 
> Log:
>   Add ucred pointer to the SysV-related memory structures.  This is required
>   for racct.
>   
>   Note that after this commit, ipcs(1) needs to be rebuilt.  Otherwise, it will
>   fail with "ipcs: sysctlbyname: kern.ipc.msqids: Cannot allocate memory".
>   
>   Sponsored by:	The FreeBSD Foundation
>   Reviewed by:	kib (earlier version)

Please use this idiom:

	foo->cred = crhold(bar->cred);

instead of:

	crhold(bar->cred);
	foo->cred = bar->cred;

I think this cleaner in terms of readability and semantics.

-- 
John Baldwin



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