]> granicus.if.org Git - curl/commitdiff
fnmatch: remove dead code
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Nov 2017 08:01:53 +0000 (09:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Nov 2017 08:01:53 +0000 (09:01 +0100)
There was a duplicate check for backslashes in the setcharset()
function.

Coverity CID 1420611

lib/curl_fnmatch.c

index 5a6f137c80a1d14f14adda411d696ad066a2feaa..da83393b4906a3f4a944645b4c769d69e494be6c 100644 (file)
@@ -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 == '\\') {