From dddb2aab8d8961fe1483258bd64cbf43b972ce0a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 7 Oct 2014 10:29:06 +0200 Subject: 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. --- src/tool_parsecfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index 7a161c3bb..c5d390b7a 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) -- cgit v1.2.3