Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Simplify previous: the original code was mostly cor...
details: https://anonhg.NetBSD.org/src/rev/0b50cf82ce42
branches: trunk
changeset: 764552:0b50cf82ce42
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 27 06:22:11 2011 +0000
description:
Simplify previous: the original code was mostly correct but relied on
"register_t" being signed.
diffstat:
sys/kern/kern_prot.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (29 lines):
diff -r d7d739ff2be6 -r 0b50cf82ce42 sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c Wed Apr 27 06:02:03 2011 +0000
+++ b/sys/kern/kern_prot.c Wed Apr 27 06:22:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_prot.c,v 1.112 2011/04/26 19:58:12 martin Exp $ */
+/* $NetBSD: kern_prot.c,v 1.113 2011/04/27 06:22:11 martin Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.112 2011/04/26 19:58:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.113 2011/04/27 06:22:11 martin Exp $");
#include "opt_compat_43.h"
@@ -231,9 +231,7 @@
*retval = kauth_cred_ngroups(l->l_cred);
if (SCARG(uap, gidsetsize) == 0)
return 0;
- if (SCARG(uap, gidsetsize) < 0)
- return EINVAL;
- if (SCARG(uap, gidsetsize) < *retval)
+ if (SCARG(uap, gidsetsize) < (int)*retval)
return EINVAL;
return kauth_cred_getgroups(l->l_cred, SCARG(uap, gidset), *retval,
Home |
Main Index |
Thread Index |
Old Index