diff options
author | Pádraig Brady <P@draigBrady.com> | 2013-09-22 03:36:03 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2013-09-22 03:41:46 +0100 |
commit | 414666db153e3b725cf67c9aece67f3fd45f5e81 (patch) | |
tree | 06ed197ca9fa1f1df8a0f9254d63548c03216d68 | |
parent | 7415d8d9f823dae484d3791b425f184f1e3b4cad (diff) | |
download | coreutils-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.c | 3 | ||||
-rw-r--r-- | src/chroot.c | 7 |
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; |