summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 02:05:19 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 02:05:19 +0100
commit17019f0db3c0def60f50de62693c507c624e67a8 (patch)
tree57492916bd81f8f9c751eb4ea03020ed34aa34d7 /src
parent23d90c62f2807bda87c6021785e6e51d3c627e0c (diff)
downloadfastd-17019f0db3c0def60f50de62693c507c624e67a8.tar
fastd-17019f0db3c0def60f50de62693c507c624e67a8.zip
lex: use array_size for keywords
Diffstat (limited to 'src')
-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)