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/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index df7279e..232f51c 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1142,7 +1142,7 @@
[dbusObjectPath, username, password(std::move(password)),
roleId(std::move(roleId)), enabled, locked,
asyncResp{std::move(asyncResp)}](int rc) {
- if (!rc)
+ if (rc <= 0)
{
messages::resourceNotFound(
asyncResp->res, "#ManagerAccount.v1_4_0.ManagerAccount",
@@ -1727,7 +1727,8 @@
const std::pair<sdbusplus::message::object_path,
dbus::utility::DBusInteracesMap>&
user) {
- return !accountName.compare(user.first.filename());
+ return accountName.compare(user.first.filename()) ==
+ 0;
});
if (userIt == users.end())