From 59c6b8e30e0f67b4e4c8dcb291fd4a48563acdba Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 11 Jul 2025 13:48:13 +0200 Subject: [PATCH] curl_fnmatch: drop local macro in favour of `sizeof()` --- lib/curl_fnmatch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index 21eca4ceda..f8160673cc 100644 --- a/lib/curl_fnmatch.c +++ b/lib/curl_fnmatch.c @@ -74,14 +74,13 @@ typedef enum { static int parsekeyword(const unsigned char **pattern, unsigned char *charset) { parsekey_state state = CURLFNM_PKW_INIT; -#define KEYLEN 10 - char keyword[KEYLEN] = { 0 }; + char keyword[10] = { 0 }; int i; const unsigned char *p = *pattern; bool found = FALSE; for(i = 0; !found; i++) { char c = (char)*p++; - if(i >= KEYLEN) + if(i >= sizeof(keyword)) return SETCHARSET_FAIL; switch(state) { case CURLFNM_PKW_INIT: