svn commit: r194389 - projects/ngroups/sys/kern
Brooks Davis
brooks at FreeBSD.org
Thu Jun 18 15:03:08 UTC 2009
On Thu, Jun 18, 2009 at 01:03:01PM +0300, Andriy Gapon wrote:
> on 17/06/2009 22:40 Brooks Davis said the following:
> > Author: brooks
> > Date: Wed Jun 17 19:40:53 2009
> > New Revision: 194389
> > URL: http://svn.freebsd.org/changeset/base/194389
> >
> > Log:
> > use MIN() instead of min() in one case.
>
> I think 'what' was pretty obvious from the diff, 'why' is what I am curious about :-)
> Just trying to learn something.
Because the file already used MIN and all the other cases in the system
that involve some form on ngroups also use MIN.
-- Brooks
> > Modified:
> > projects/ngroups/sys/kern/kern_prot.c
> >
> > Modified: projects/ngroups/sys/kern/kern_prot.c
> > ==============================================================================
> > --- projects/ngroups/sys/kern/kern_prot.c Wed Jun 17 19:01:47 2009 (r194388)
> > +++ projects/ngroups/sys/kern/kern_prot.c Wed Jun 17 19:40:53 2009 (r194389)
> > @@ -1899,7 +1899,7 @@ cru2x(struct ucred *cr, struct xucred *x
> > xcr->cr_version = XUCRED_VERSION;
> > xcr->cr_uid = cr->cr_uid;
> >
> > - ngroups = min(cr->cr_ngroups, XU_NGROUPS);
> > + ngroups = MIN(cr->cr_ngroups, XU_NGROUPS);
> > xcr->cr_ngroups = ngroups;
> > bcopy(cr->cr_groups, xcr->cr_groups,
> > ngroups * sizeof(*cr->cr_groups));
>
>
> --
> Andriy Gapon
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20090618/0f0b88d5/attachment.pgp
More information about the svn-src-projects
mailing list