Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/newgrp PR/47319 use addgrp_ret_t instead of magic va...
details: https://anonhg.NetBSD.org/src/rev/f66db2bbabb2
branches: trunk
changeset: 330111:f66db2bbabb2
user: shm <shm%NetBSD.org@localhost>
date: Mon Jun 23 06:57:31 2014 +0000
description:
PR/47319 use addgrp_ret_t instead of magic values
diffstat:
usr.bin/newgrp/grutil.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 17dbab3a99ea -r f66db2bbabb2 usr.bin/newgrp/grutil.c
--- a/usr.bin/newgrp/grutil.c Mon Jun 23 06:27:58 2014 +0000
+++ b/usr.bin/newgrp/grutil.c Mon Jun 23 06:57:31 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grutil.c,v 1.3 2013/01/24 17:46:30 christos Exp $ */
+/* $NetBSD: grutil.c,v 1.4 2014/06/23 06:57:31 shm Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: grutil.c,v 1.3 2013/01/24 17:46:30 christos Exp $");
+__RCSID("$NetBSD: grutil.c,v 1.4 2014/06/23 06:57:31 shm Exp $");
#include <sys/param.h>
#include <err.h>
@@ -147,7 +147,7 @@
return ADDGRP_NOERROR;
rval = alloc_groups(&ngroups, &groups, &ngroupsmax);
- if (rval != 0)
+ if (rval != ADDGRP_NOERROR)
return rval;
/*
@@ -235,7 +235,7 @@
if (ruid == 0 || pwd->pw_gid == grp->gr_gid)
return grp->gr_gid;
- if (alloc_groups(&ngroups, &groups, &ngroupsmax) == 0) {
+ if (alloc_groups(&ngroups, &groups, &ngroupsmax) == ADDGRP_NOERROR) {
int i;
for (i = 0; i < ngroups; i++)
if (groups[i] == grp->gr_gid) {
Home |
Main Index |
Thread Index |
Old Index