diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-12 00:02:43 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2015-07-12 00:02:43 +0000 |
commit | dda50e62a030ac93fd85476aa0e75f27fa9c47eb (patch) | |
tree | 997b3e306011ecb9a3081d6e6c402951c3c4421d /pw/pw_user.c | |
parent | fbab7d3255ef972d79ee2480df4dc928fd58d6e6 (diff) | |
download | pw-darwin-dda50e62a030ac93fd85476aa0e75f27fa9c47eb.tar.gz pw-darwin-dda50e62a030ac93fd85476aa0e75f27fa9c47eb.tar.zst pw-darwin-dda50e62a030ac93fd85476aa0e75f27fa9c47eb.zip |
Make getarg return NULL if args is NULL
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r-- | pw/pw_user.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c index 315af39..16b2ac8 100644 --- a/pw/pw_user.c +++ b/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; } |