From: Gunnar Beutner Date: Mon, 2 Mar 2015 12:20:31 +0000 (+0100) Subject: Remove redundant checks X-Git-Tag: v2.3.0~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a062a688b329e3b967749a51d89d4a06c2098ed;p=icinga2 Remove redundant checks --- diff --git a/lib/cli/troubleshootcommand.cpp b/lib/cli/troubleshootcommand.cpp index 72f41f3ba..f4344755a 100644 --- a/lib/cli/troubleshootcommand.cpp +++ b/lib/cli/troubleshootcommand.cpp @@ -205,8 +205,7 @@ bool TroubleshootCommand::ObjectInfo(InfoLog& log, const boost::program_options: } } CheckObjectFile(objectfile, log, OFile, OConsole, logs, configs); - if (OFile != NULL) - delete OFile; + delete OFile; } if (vm.count("include-vars")) { @@ -497,7 +496,7 @@ void TroubleshootCommand::CheckObjectFile(const String& objectfile, InfoLog& log } else { ObjectListUtility::PrintObject(sStream, first, message, type_count, "", ""); - if(OFile != NULL) { + if (OFile) { InfoLogLine(*OFile) << sStream.str(); sStream.flush();