Enable readability-implicit-bool-conversion checks
These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.
Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1ca0be980d136bd4e5474341f4fd62f2f6bbdbae
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 2001756..567741d 100644
--- a/redfish-core/include/gzfile.hpp
+++ b/redfish-core/include/gzfile.hpp
@@ -13,7 +13,7 @@
std::vector<std::string>& logEntries, size_t& logCount)
{
gzFile logStream = gzopen(filename.c_str(), "r");
- if (!logStream)
+ if (logStream == nullptr)
{
BMCWEB_LOG_ERROR << "Can't open gz file: " << filename << '\n';
return false;
@@ -71,7 +71,7 @@
BMCWEB_LOG_ERROR << "Error occurs during parsing host log.\n";
return false;
}
- } while (!gzeof(logStream));
+ } while (gzeof(logStream) != 1);
return true;
}