PERFORCE change 100289 for review

John Baldwin jhb at FreeBSD.org
Thu Jun 29 14:41:06 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100289

Change 100289 by jhb at jhb_mutex on 2006/06/29 14:18:32

	Compile and other nits.

Affected files ...

.. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_misc.c#26 edit
.. //depot/projects/smpng/sys/kern/kern_prot.c#95 edit

Differences ...

==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_misc.c#26 (text+ko) ====

@@ -653,7 +653,8 @@
 {
 	ibcs2_gid_t iset[NGROUPS_MAX];
 	gid_t gp[NGROUPS_MAX];
-	int error, i, ngrp;
+	u_int i, ngrp;
+	int error;
 
 	if (uap->gidsetsize < 0)
 		return (EINVAL);

==== //depot/projects/smpng/sys/kern/kern_prot.c#95 (text+ko) ====

@@ -300,7 +300,8 @@
 getgroups(struct thread *td, register struct getgroups_args *uap)
 {
 	gid_t groups[NGROUPS];
-	int error, ngrp;
+	u_int ngrp;
+	int error;
 
         ngrp = MIN(uap->gidsetsize, NGROUPS);
 	error = kern_getgroups(td, &ngrp, groups);
@@ -317,7 +318,6 @@
 kern_getgroups(struct thread *td, u_int *ngrp, gid_t *groups)
 {
 	struct ucred *cred;
-	int error;
 
 	cred = td->td_ucred;
 	if (*ngrp == 0) {
@@ -327,7 +327,7 @@
 	if (*ngrp < cred->cr_ngroups)
 		return (EINVAL);
 	*ngrp = cred->cr_ngroups;
-	bcopy(cred->cr_groups, gidset, ngrp * sizeof(gid_t));
+	bcopy(cred->cr_groups, groups, *ngrp * sizeof(gid_t));
 	return (0);
 }
 


More information about the p4-projects mailing list