summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw_user.c
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-07-12 00:02:43 +0000
committerbapt <bapt@FreeBSD.org>2015-07-12 00:02:43 +0000
commitf15eb75bd08d730810d4c3e523b3c276e7d1d861 (patch)
tree64c74c2aec85952910e00ad57c345106e0e4312c /usr.sbin/pw/pw_user.c
parent2f9218d54244570b553e9ad09617607cb18f7381 (diff)
downloadFreeBSD-src-f15eb75bd08d730810d4c3e523b3c276e7d1d861.zip
FreeBSD-src-f15eb75bd08d730810d4c3e523b3c276e7d1d861.tar.gz
Make getarg return NULL if args is NULL
Diffstat (limited to 'usr.sbin/pw/pw_user.c')
-rw-r--r--usr.sbin/pw/pw_user.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index 315af39..16b2ac8 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -874,11 +874,8 @@ pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer)
(grp->gr_mem == NULL || grp->gr_mem[0] == NULL)) {
gid = grp->gr_gid; /* Already created? Use it anyway... */
} else {
- struct cargs grpargs;
gid_t grid = -1;
- LIST_INIT(&grpargs);
-
/*
* We need to auto-create a group with the user's name. We
* can send all the appropriate output to our sister routine
@@ -893,7 +890,7 @@ pw_gidpolicy(struct cargs * args, char *nam, gid_t prefer)
if (conf.dryrun) {
gid = pw_groupnext(cnf, true);
} else {
- pw_group(M_ADD, nam, grid, &grpargs);
+ pw_group(M_ADD, nam, grid, NULL);
if ((grp = GETGRNAM(nam)) != NULL)
gid = grp->gr_gid;
}
OpenPOWER on IntegriCloud