summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lex.c b/src/lex.c
index 4a719de..9fbab9e 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -358,7 +358,7 @@ static int parse_keyword(YYSTYPE *yylval, YYLTYPE *yylloc, fastd_lex_t *lex) {
char *token = get_token(lex);
const keyword_t key = { .keyword = token };
- const keyword_t *ret = bsearch(&key, keywords, sizeof(keywords)/sizeof(keyword_t), sizeof(keyword_t), compare_keywords);
+ const keyword_t *ret = bsearch(&key, keywords, array_size(keywords), sizeof(keyword_t), compare_keywords);
free(token);
if (!ret)