aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-06-18 00:12:43 -0400
committerRob Landley <rob@landley.net>2007-06-18 00:12:43 -0400
commit7aa9d8fbf1d56a5b41fb007c0bf2089a6e3dae98 (patch)
treeaff7eebbe4d1c27cc3ece1e99d8549ec1e5c774d
parent0d8dfb2b905c374a65c2ca245bf588444aec5fff (diff)
downloadtoybox-7aa9d8fbf1d56a5b41fb007c0bf2089a6e3dae98.tar.gz
Fix "Need 1 arguments".
-rw-r--r--lib/args.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/args.c b/lib/args.c
index c9ade1e9..95643c3e 100644
--- a/lib/args.c
+++ b/lib/args.c
@@ -296,8 +296,10 @@ notflag:
}
// Sanity check
- if (optarg<minargs) error_exit("Need %d arguments", minargs);
- if (optarg>maxargs) error_exit("Max %d arguments", maxargs);
+ if (optarg<minargs)
+ error_exit("Need %d argument%s", minargs, minargs ? "s" : "");
+ if (optarg>maxargs)
+ error_exit("Max %d argument%s", maxargs, maxargs ? "s" : "");
}
// Loop through files listed on the command line