From 30592a54514ca52253ed5f2eff64684e32d7ff05 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 26 Apr 2001 14:56:45 +0000 Subject: [PATCH] Fix a silly off-by-one error noticed by Santiago Garcia Mantinan -Erik --- chgrp.c | 2 +- chmod.c | 2 +- chown.c | 2 +- coreutils/chgrp.c | 2 +- coreutils/chmod.c | 2 +- coreutils/chown.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chgrp.c b/chgrp.c index 0bb1e75c9..83bb19463 100644 --- a/chgrp.c +++ b/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/chmod.c b/chmod.c index 5e12e76b9..f22e5d06f 100644 --- a/chmod.c +++ b/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/chown.c b/chown.c index ff935a4c0..43d62b1e0 100644 --- a/chown.c +++ b/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; diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c index 0bb1e75c9..83bb19463 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 5e12e76b9..f22e5d06f 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 ff935a4c0..43d62b1e0 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; -- 2.25.1