From 53146cc9ec7f3af5a8fa6245bf01c4f9c0fd19b4 Mon Sep 17 00:00:00 2001 From: Robert Griebl Date: Mon, 27 May 2002 22:24:53 +0000 Subject: Added include for isdigit(); simplified - detection --- coreutils/head.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coreutils/head.c') diff --git a/coreutils/head.c b/coreutils/head.c index c5c11fc7b..ad21e1b95 100644 --- a/coreutils/head.c +++ b/coreutils/head.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "busybox.h" static int head(int len, FILE *fp) @@ -47,7 +48,7 @@ int head_main(int argc, char **argv) FILE *fp; int need_headers, opt, len = 10, status = EXIT_SUCCESS; - if (( argc >= 2 ) && ( strlen ( argv [1] ) >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { + if (( argc >= 2 ) && ( argv [1][0] == '-' ) && isdigit ( argv [1][1] )) { len = atoi ( &argv [1][1] ); optind = 2; } -- cgit v1.2.3