From 80b8b39899a09c7516920cda5fd343b3086d4824 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 25 Jun 2007 10:55:35 +0000 Subject: Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ) --- coreutils/test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'coreutils/test.c') diff --git a/coreutils/test.c b/coreutils/test.c index 36fb38a64..7b87a42f9 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -146,7 +146,6 @@ static const struct t_op { { ")" , RPAREN , PAREN }, }; -enum { NUM_OPS = sizeof(ops) / sizeof(ops[0]) }; #if ENABLE_FEATURE_TEST_64 typedef int64_t arith_t; @@ -471,7 +470,7 @@ static enum token t_lex(char *s) return op->op_num; } op++; - } while (op < ops + NUM_OPS); + } while (op < ops + ARRAY_SIZE(ops)); return OPERAND; } -- cgit v1.2.3