From 9d7b581310eb500910a4cf89e9f2a317eee40ec8 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 14 Oct 2022 16:21:42 -0400 Subject: Add `COUNTOF` macro to tools/common.h --- tools/make_patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/make_patch.c') diff --git a/tools/make_patch.c b/tools/make_patch.c index 71c6b455..ecfd67b2 100644 --- a/tools/make_patch.c +++ b/tools/make_patch.c @@ -165,7 +165,7 @@ int strfind(const char *s, const char *list[], int count) { return -1; } -#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, sizeof (const char *[]){__VA_ARGS__} / sizeof(const char *)) +#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, COUNTOF((const char *[]){__VA_ARGS__})) int parse_arg_value(const char *arg, bool absolute, const struct Symbol *symbols, const char *patch_name) { // Comparison operators for "ConditionValueB" evaluate to their particular values -- cgit v1.3.1-sl0p