diff options
author | Robert Griebl <griebl@gmx.de> | 2002-05-28 02:24:53 +0400 |
---|---|---|
committer | Robert Griebl <griebl@gmx.de> | 2002-05-28 02:24:53 +0400 |
commit | 53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4 (patch) | |
tree | c2296e39db1a62fc8d59cf9a64a2f46950b4b63b /coreutils/tail.c | |
parent | 8302c43265a9f83baa96b15a6082954526988c8b (diff) |
Added include for isdigit(); simplified -<num> detection
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r-- | coreutils/tail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c index 8201c80a0..024441e73 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -25,6 +25,7 @@ #include <fcntl.h> #include <getopt.h> #include <string.h> +#include <ctype.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> @@ -68,7 +69,7 @@ int tail_main(int argc, char **argv) char *s, *start, *end, buf[BUFSIZ]; int i, opt; - if (( argc >= 2 ) && ( strlen ( argv [1] ) >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { + if (( argc >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { count = atoi ( &argv [1][1] ); optind = 2; } |