summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-03-19 19:40:43 +0000
committerEric Andersen2001-03-19 19:40:43 +0000
commit8269396491913ab551b558756f6581a4d12bd00f (patch)
tree40e85453e966d85dadd037dc78b0d1cae0f989b7
parent2ccfef2004675cc6cb18b9cdad1ebdaf892a10c2 (diff)
downloadbusybox-8269396491913ab551b558756f6581a4d12bd00f.zip
busybox-8269396491913ab551b558756f6581a4d12bd00f.tar.gz
Simpify detection of no options.
-rw-r--r--coreutils/rm.c2
-rw-r--r--rm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/rm.c b/coreutils/rm.c
index a3542aa..768e3ca 100644
--- a/coreutils/rm.c
+++ b/coreutils/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
diff --git a/rm.c b/rm.c
index a3542aa..768e3ca 100644
--- 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