summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-09-22 03:36:03 +0100
committerPádraig Brady <P@draigBrady.com>2013-09-22 03:41:46 +0100
commit414666db153e3b725cf67c9aece67f3fd45f5e81 (patch)
tree06ed197ca9fa1f1df8a0f9254d63548c03216d68
parent7415d8d9f823dae484d3791b425f184f1e3b4cad (diff)
downloadcoreutils-414666db153e3b725cf67c9aece67f3fd45f5e81.tar.xz
maint: remove unused parameters to parse_user_spec()
* src/chown.c (main): Since "name" parameters to parse_user_spec() are now optional, just pass NULL for those unused parameters. * src/chroot.c (main): Likewise.
-rw-r--r--src/chown.c3
-rw-r--r--src/chroot.c7
2 files changed, 2 insertions, 8 deletions
diff --git a/src/chown.c b/src/chown.c
index 9db0a569b..375917856 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -226,10 +226,9 @@ main (int argc, char **argv)
case FROM_OPTION:
{
- char *u_dummy, *g_dummy;
const char *e = parse_user_spec (optarg,
&required_uid, &required_gid,
- &u_dummy, &g_dummy);
+ NULL, NULL);
if (e)
error (EXIT_FAILURE, 0, "%s: %s", e, quote (optarg));
break;
diff --git a/src/chroot.c b/src/chroot.c
index b77a8bf66..89fd3920e 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -229,16 +229,11 @@ main (int argc, char **argv)
{
uid_t uid = -1;
gid_t gid = -1;
- char *user;
- char *group;
- char const *err = parse_user_spec (userspec, &uid, &gid, &user, &group);
+ char const *err = parse_user_spec (userspec, &uid, &gid, NULL, NULL);
if (err)
error (EXIT_CANCELED, errno, "%s", err);
- free (user);
- free (group);
-
if (groups && set_additional_groups (groups))
fail = true;