mirror of
https://github.com/curl/curl.git
synced 2026-06-05 19:14:14 +03:00
curl_fnmatch: drop local macro in favour of sizeof()
This commit is contained in:
parent
8eab2b7086
commit
59c6b8e30e
1 changed files with 2 additions and 3 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue