From 459903bd4e270ab4884ba9577516f9b2753898b0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 27 Nov 2006 14:44:18 +0000 Subject: Provide our own isdigit macro. saves more than 400 bytes. --- coreutils/tail.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'coreutils/tail.c') diff --git a/coreutils/tail.c b/coreutils/tail.c index 82c0d99bc..ed5ea1467 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -93,7 +93,7 @@ static const char header_fmt[] = "\n==> %s <==\n"; int tail_main(int argc, char **argv) { long count = 10; - unsigned int sleep_period = 1; + unsigned sleep_period = 1; int from_top = 0; int follow = 0; int header_threshhold = 1; @@ -110,10 +110,9 @@ int tail_main(int argc, char **argv) #if !ENABLE_DEBUG_YANK_SUSv2 || ENABLE_FEATURE_FANCY_TAIL /* Allow legacy syntax of an initial numeric option without -n. */ - if (argc >=2 && ((argv[1][0] == '+') || ((argv[1][0] == '-') - /* && (isdigit)(argv[1][1]) */ - && (((unsigned int)(argv[1][1] - '0')) <= 9)))) - { + if (argc >= 2 && (argv[1][0] == '+' || argv[1][0] == '-') + && isdigit(argv[1][1]) + ) { optind = 2; optarg = argv[1]; goto GET_COUNT; -- cgit v1.2.3-55-g6feb