mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
lib: fix some type mismatches and remove unneeded typecasts
Many of these castings are unneeded if we change the variables to work better with each other. Ref: https://github.com/curl/curl/pull/9823 Closes https://github.com/curl/curl/pull/9835
This commit is contained in:
parent
14061f784c
commit
f151ec6c10
23 changed files with 66 additions and 66 deletions
|
|
@ -76,9 +76,9 @@ static int parsekeyword(unsigned char **pattern, unsigned char *charset)
|
|||
parsekey_state state = CURLFNM_PKW_INIT;
|
||||
#define KEYLEN 10
|
||||
char keyword[KEYLEN] = { 0 };
|
||||
int found = FALSE;
|
||||
int i;
|
||||
unsigned char *p = *pattern;
|
||||
bool found = FALSE;
|
||||
for(i = 0; !found; i++) {
|
||||
char c = *p++;
|
||||
if(i >= KEYLEN)
|
||||
|
|
@ -368,14 +368,13 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
|
|||
*/
|
||||
int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
|
||||
{
|
||||
int rc;
|
||||
(void)ptr; /* the argument is specified by the curl_fnmatch_callback
|
||||
prototype, but not used by Curl_fnmatch() */
|
||||
if(!pattern || !string) {
|
||||
return CURL_FNMATCH_FAIL;
|
||||
}
|
||||
rc = fnmatch(pattern, string, 0);
|
||||
switch(rc) {
|
||||
|
||||
switch(fnmatch(pattern, string, 0)) {
|
||||
case 0:
|
||||
return CURL_FNMATCH_MATCH;
|
||||
case FNM_NOMATCH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue