Enable readability-redundant-control-flow checks
These checks are a nice addition to our static analysis, as they
simplify code quite a bit, as can be seen by this diff being negative
lines.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I60ede4ad23d7e5337e811d70ddcab24bf8986891
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index f35db24..9f40725 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -3364,12 +3364,8 @@
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
end = split[1].data() + split[1].size();
auto [ptrValue, ecValue] = std::from_chars(start, end, currentValue);
- if (ptrValue != end || ecValue != std::errc())
- {
- return false;
- }
- return true;
+ return ptrValue == end && ecValue != std::errc();
}
inline void requestRoutesPostCodesEntryAdditionalData(App& app)