From 6e6bf60357f4587a7e61d34eba40b24ef9c62ac8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 6 Nov 2017 09:01:53 +0100 Subject: fnmatch: remove dead code There was a duplicate check for backslashes in the setcharset() function. Coverity CID 1420611 --- lib/curl_fnmatch.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index 5a6f137c8..da83393b4 100644 --- a/lib/curl_fnmatch.c +++ b/lib/curl_fnmatch.c @@ -235,12 +235,7 @@ static int setcharset(unsigned char **p, unsigned char *charset) return SETCHARSET_FAIL; break; case CURLFNM_SCHS_MAYRANGE2: - if(c == '\\') { - c = *(++(*p)); - if(!ISPRINT(c)) - return SETCHARSET_FAIL; - } - else if(c == ']') { + if(c == ']') { return SETCHARSET_OK; } else if(c == '\\') { -- cgit v1.2.1