diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-01-26 02:05:19 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-01-26 02:05:19 +0100 |
commit | 17019f0db3c0def60f50de62693c507c624e67a8 (patch) | |
tree | 57492916bd81f8f9c751eb4ea03020ed34aa34d7 | |
parent | 23d90c62f2807bda87c6021785e6e51d3c627e0c (diff) | |
download | fastd-17019f0db3c0def60f50de62693c507c624e67a8.tar fastd-17019f0db3c0def60f50de62693c507c624e67a8.zip |
lex: use array_size for keywords
-rw-r--r-- | src/lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |