From: Amos Jeffries Date: Tue, 29 Nov 2016 16:38:45 +0000 (+1300) Subject: Cleanup: use return after self_destruct() to make Coverity happier X-Git-Tag: SQUID_4_0_17~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b427c3b4f318b07ed1725dc92af169f1eb553e09;p=thirdparty%2Fsquid.git Cleanup: use return after self_destruct() to make Coverity happier Detected by Coverity Scan. Issue 1154218. --- diff --git a/src/format/Config.cc b/src/format/Config.cc index 1ab75c77e3..51c93137a5 100644 --- a/src/format/Config.cc +++ b/src/format/Config.cc @@ -20,10 +20,12 @@ Format::FmtConfig::parseFormats() { char *name, *def; - if ((name = ConfigParser::NextToken()) == NULL) + if ((name = ConfigParser::NextToken()) == nullptr) { self_destruct(); + return; + } - if ((def = ConfigParser::NextQuotedOrToEol()) == NULL) { + if ((def = ConfigParser::NextQuotedOrToEol()) == nullptr) { self_destruct(); return; }