From 2d58c109ba3480411cf49ba9e24672d4ccfd8a1e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 14 Jan 2023 23:39:07 +0100 Subject: [PATCH] ksx6924: use ARRAYLEN --- client/src/ksx6924/ksx6924core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/ksx6924/ksx6924core.c b/client/src/ksx6924/ksx6924core.c index 39b390039..307573f74 100644 --- a/client/src/ksx6924/ksx6924core.c +++ b/client/src/ksx6924/ksx6924core.c @@ -99,7 +99,7 @@ typedef struct { KEY_TYPE key, const char* defaultValue) { \ struct _ksx6924_enum_ ## KEY_TYPE *r = bsearch( \ &key, KSX6924_ENUM_ ## NAME, \ - sizeof(KSX6924_ENUM_ ## NAME) / sizeof(KSX6924_ENUM_ ## NAME [0]), \ + ARRAYLEN(KSX6924_ENUM_ ## NAME), \ sizeof(KSX6924_ENUM_ ## NAME [0]), \ _ksx6924_ ## KEY_TYPE ## _enum_compare); \ if (r == NULL) { \