As Larry pointed out, this the off by one canbe fixed much more elegantly.

This commit is contained in:
Eric Andersen 2001-04-26 15:41:51 +00:00
parent 30592a5451
commit 3c3277f0bd
6 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ int chgrp_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;

View File

@ -66,7 +66,7 @@ int chmod_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;

View File

@ -85,7 +85,7 @@ int chown_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;

View File

@ -71,7 +71,7 @@ int chgrp_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;

View File

@ -66,7 +66,7 @@ int chmod_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;

View File

@ -85,7 +85,7 @@ int chown_main(int argc, char **argv)
}
/* Ok, ready to do the deed now */
while (optind++ < argc-1) {
while (++optind < argc) {
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
fileAction, fileAction, NULL) == FALSE) {
return EXIT_FAILURE;