From: Daniel Stenberg Date: Mon, 6 Nov 2017 08:01:53 +0000 (+0100) Subject: fnmatch: remove dead code X-Git-Tag: curl-7_57_0~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e6bf60357f4587a7e61d34eba40b24ef9c62ac8;p=thirdparty%2Fcurl.git fnmatch: remove dead code There was a duplicate check for backslashes in the setcharset() function. Coverity CID 1420611 --- diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index 5a6f137c80..da83393b49 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 == '\\') {