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/src/webserver_main.cpp b/src/webserver_main.cpp
index b613008..b05161d 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -40,7 +40,7 @@
{
BMCWEB_LOG_INFO << "attempting systemd socket activation";
if (sd_is_socket_inet(SD_LISTEN_FDS_START, AF_UNSPEC, SOCK_STREAM, 1,
- 0))
+ 0) != 0)
{
BMCWEB_LOG_INFO << "Starting webserver on socket handle "
<< SD_LISTEN_FDS_START;
@@ -113,7 +113,7 @@
crow::google_api::requestRoutes(app);
#endif
- if (bmcwebInsecureDisableXssPrevention)
+ if (bmcwebInsecureDisableXssPrevention != 0)
{
cors_preflight::requestRoutes(app);
}
@@ -128,7 +128,7 @@
#ifndef BMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES
int rc = redfish::EventServiceManager::startEventLogMonitor(*io);
- if (rc)
+ if (rc != 0)
{
BMCWEB_LOG_ERROR << "Redfish event handler setup failed...";
return rc;