]> granicus.if.org Git - icinga2/commitdiff
Remove redundant checks
authorGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 12:20:31 +0000 (13:20 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Mon, 2 Mar 2015 12:21:06 +0000 (13:21 +0100)
lib/cli/troubleshootcommand.cpp

index 72f41f3ba34d4d875181b86d1897204dd6812d44..f4344755af7703e1726712f744d6e9bfb44d41fe 100644 (file)
@@ -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();