Simpify detection of no options.
authorEric Andersen <andersen@codepoet.org>
Mon, 19 Mar 2001 19:40:43 +0000 (19:40 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 19 Mar 2001 19:40:43 +0000 (19:40 -0000)
coreutils/rm.c
rm.c

index a3542aaf63da7747751ed813f249cb9522d4ff37..768e3ca64c537bee16591f845c11f7715ef28df1 100644 (file)
@@ -112,7 +112,7 @@ extern int rm_main(int argc, char **argv)
                }
        }
        
-       if ((argc-optind) < 1 && forceFlag == FALSE) {
+       if (argc == optind && forceFlag == FALSE) {
                show_usage();
        }
 #ifdef BB_FEATURE_RM_INTERACTIVE
diff --git a/rm.c b/rm.c
index a3542aaf63da7747751ed813f249cb9522d4ff37..768e3ca64c537bee16591f845c11f7715ef28df1 100644 (file)
--- a/rm.c
+++ b/rm.c
@@ -112,7 +112,7 @@ extern int rm_main(int argc, char **argv)
                }
        }
        
-       if ((argc-optind) < 1 && forceFlag == FALSE) {
+       if (argc == optind && forceFlag == FALSE) {
                show_usage();
        }
 #ifdef BB_FEATURE_RM_INTERACTIVE