Ignore some generated files
[oweals/busybox.git] / chown.c
diff --git a/chown.c b/chown.c
index 43d62b1e07d14c694f459664fdba6e8b799ddd4f..9ff287251cc56b7207c29c901e68b889a240bb51 100644 (file)
--- a/chown.c
+++ b/chown.c
@@ -57,6 +57,7 @@ int chown_main(int argc, char **argv)
                switch (opt) {
                        case 'R':
                                recursiveFlag = TRUE;
+                               break;
                        default:
                                show_usage();
                }
@@ -85,7 +86,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;