summaryrefslogtreecommitdiff
path: root/include/hostname_monitor.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-25 21:39:19 +0300
committerEd Tanous <ed@tanous.net>2022-02-15 03:35:55 +0300
commite662eae819f545ef07193f216b42e161b7ff7a46 (patch)
tree2b13d88ae009fa7af3396252c8787992ff2cc6c8 /include/hostname_monitor.hpp
parentc5ba4c27ddb28c7844c0ea3078df4114f531dd25 (diff)
downloadbmcweb-e662eae819f545ef07193f216b42e161b7ff7a46.tar.xz
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
Diffstat (limited to 'include/hostname_monitor.hpp')
-rw-r--r--include/hostname_monitor.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index 30186b650e..73c315fb73 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -35,7 +35,7 @@ inline void installCertificate(const std::filesystem::path& certPath)
inline int onPropertyUpdate(sd_bus_message* m, void* /* userdata */,
sd_bus_error* retError)
{
- if (retError == nullptr || sd_bus_error_is_set(retError))
+ if (retError == nullptr || (sd_bus_error_is_set(retError) != 0))
{
BMCWEB_LOG_ERROR << "Got sdbus error on match";
return 0;
@@ -101,7 +101,7 @@ inline int onPropertyUpdate(sd_bus_message* m, void* /* userdata */,
ASN1_IA5STRING* asn1 = static_cast<ASN1_IA5STRING*>(
X509_get_ext_d2i(cert, NID_netscape_comment, nullptr, nullptr));
- if (asn1)
+ if (asn1 != nullptr)
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
std::string_view comment(reinterpret_cast<const char*>(asn1->data),