summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/chgrp.c2
-rw-r--r--coreutils/chmod.c2
-rw-r--r--coreutils/chown.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 0bb1e75..83bb194 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -71,7 +71,7 @@ int chgrp_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
- while (optind++ < argc) {
+ while (optind++ < argc-1) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 5e12e76..f22e5d0 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -66,7 +66,7 @@ int chmod_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
- while (optind++ < argc) {
+ while (optind++ < argc-1) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;
diff --git a/coreutils/chown.c b/coreutils/chown.c
index ff935a4..43d62b1 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -85,7 +85,7 @@ int chown_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
- while (optind++ < argc) {
+ while (optind++ < argc-1) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;