diff options
author | Denis Vlasenko | 2007-06-25 10:55:35 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-06-25 10:55:35 +0000 |
commit | 80b8b39899a09c7516920cda5fd343b3086d4824 (patch) | |
tree | aa9903fd6b64d19c5f640fa302272d85c92b204e /shell/hush.c | |
parent | 1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff) | |
download | busybox-80b8b39899a09c7516920cda5fd343b3086d4824.zip busybox-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz |
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c index a446bbe..275b69e 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -2889,10 +2889,10 @@ static int reserved_word(o_string *dest, struct p_context *ctx) { "done", RES_DONE, FLAG_END } #endif }; - enum { NRES = sizeof(reserved_list)/sizeof(reserved_list[0]) }; + const struct reserved_combo *r; - for (r = reserved_list; r < reserved_list + NRES; r++) { + for (r = reserved_list; r < reserved_list + ARRAY_SIZE(reserved_list); r++) { if (strcmp(dest->data, r->literal) != 0) continue; debug_printf("found reserved word %s, code %d\n", r->literal, r->code); |