projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f33b78
)
(main): When too few arguments are given, don't just
author
Jim Meyering
<jim@meyering.net>
Tue, 25 Jul 1995 04:50:04 +0000
(
04:50
+0000)
committer
Jim Meyering
<jim@meyering.net>
Tue, 25 Jul 1995 04:50:04 +0000
(
04:50
+0000)
issue the usage message; also report why.
src/csplit.c
patch
|
blob
|
history
diff --git
a/src/csplit.c
b/src/csplit.c
index
9fbf0e3
..
6c1b6d2
100644
(file)
--- a/
src/csplit.c
+++ b/
src/csplit.c
@@
-1524,8
+1524,11
@@
main (argc, argv)
if (show_help)
usage (0);
- if (optind >= argc - 1)
- usage (1);
+ if (argc - optind < 2)
+ {
+ error (0, 0, "too few arguments");
+ usage (1);
+ }
if (suffix)
filename_space = (char *) xmalloc (strlen (prefix) + max_out (suffix) + 2);