From: Jim Meyering Date: Mon, 26 Apr 1999 00:39:47 +0000 (+0000) Subject: (main): Handle the case in which seq is given no args. X-Git-Tag: SH-UTILS-1_16h~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf73dd529725dbfdf95c768792b77f87b190cd14;p=thirdparty%2Fcoreutils.git (main): Handle the case in which seq is given no args. --- diff --git a/src/seq.c b/src/seq.c index 27ebc9df0e..af2be47c6e 100644 --- a/src/seq.c +++ b/src/seq.c @@ -140,6 +140,12 @@ main (int argc, char **argv) } #endif + if (argc == 1) + { + error (0, 0, _("too few arguments")); + usage (1); + } + /* We have to handle negative numbers in the command line but this conflicts with the command line arguments. So explicitly check first whether the next argument looks like a negative number. */