summaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c4
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);