From: Daniel Stenberg Date: Tue, 7 Oct 2014 08:29:06 +0000 (+0200) Subject: parseconfig: skip a NULL check X-Git-Tag: curl-7_39_0~177 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dddb2aab8d8961fe1483258bd64cbf43b972ce0a;p=thirdparty%2Fcurl.git parseconfig: skip a NULL check 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. --- diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index 7a161c3bb8..c5d390b7ab 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -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)