]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup: use return after self_destruct() to make Coverity happier
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 29 Nov 2016 16:38:45 +0000 (05:38 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 29 Nov 2016 16:38:45 +0000 (05:38 +1300)
 Detected by Coverity Scan. Issue 1154218.

src/format/Config.cc

index 1ab75c77e32fe3469334379b8f748f259e867c2d..51c93137a5b3703ecf0e900b21146967a1af4239 100644 (file)
@@ -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;
     }