diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-25 10:55:35 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-25 10:55:35 +0000 |
commit | 80b8b39899a09c7516920cda5fd343b3086d4824 (patch) | |
tree | aa9903fd6b64d19c5f640fa302272d85c92b204e /editors/awk.c | |
parent | 1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff) | |
download | busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.tar.bz2 busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.zip |
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'editors/awk.c')
-rw-r--r-- | editors/awk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/awk.c b/editors/awk.c index 90ba64348..940a7948e 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -390,7 +390,7 @@ static const char vValues[] = | |||
390 | /* hash size may grow to these values */ | 390 | /* hash size may grow to these values */ |
391 | #define FIRST_PRIME 61; | 391 | #define FIRST_PRIME 61; |
392 | static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; | 392 | static const unsigned PRIMES[] = { 251, 1021, 4093, 16381, 65521 }; |
393 | enum { NPRIMES = sizeof(PRIMES) / sizeof(PRIMES[0]) }; | 393 | |
394 | 394 | ||
395 | 395 | ||
396 | /* Globals. Split in two parts so that first one is addressed | 396 | /* Globals. Split in two parts so that first one is addressed |
@@ -570,7 +570,7 @@ static void hash_rebuild(xhash *hash) | |||
570 | unsigned newsize, i, idx; | 570 | unsigned newsize, i, idx; |
571 | hash_item **newitems, *hi, *thi; | 571 | hash_item **newitems, *hi, *thi; |
572 | 572 | ||
573 | if (hash->nprime == NPRIMES) | 573 | if (hash->nprime == ARRAY_SIZE(PRIMES)) |
574 | return; | 574 | return; |
575 | 575 | ||
576 | newsize = PRIMES[hash->nprime++]; | 576 | newsize = PRIMES[hash->nprime++]; |