From: Amos Jeffries Date: Sun, 20 Nov 2016 16:44:03 +0000 (+1300) Subject: Cleanup: use return after self_destruct() to make Coverity happier X-Git-Tag: M-staged-PR71~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a25ed26cbc9490e50066ee4f8f7da948862b5a6f;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; }