]> granicus.if.org Git - curl/commitdiff
parseconfig: skip a NULL check
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2014 08:29:06 +0000 (10:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2014 08:29:06 +0000 (10:29 +0200)
Coverity CID 1154198. This NULL check implies that the pointer _can_ be
NULL at this point, which it can't. Thus it is dead code. It tricks
static analyzers to warn about dereferencing the pointer since the code
seems to imply it can be NULL.

src/tool_parsecfg.c

index 7a161c3bb8762978dc85999b62d5a4d963983f38..c5d390b7ab9cd180fa4e08855f5a6a9a2e095e9d 100644 (file)
@@ -208,7 +208,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
         }
       }
 
-      if(param && !*param) {
+      if(!*param) {
         /* do this so getparameter can check for required parameters.
            Otherwise it always thinks there's a parameter. */
         if(alloced_param)