summaryrefslogtreecommitdiff
path: root/redfish-core/lib/log_services.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-25 21:07:45 +0300
committerEd Tanous <ed@tanous.net>2022-02-07 19:41:37 +0300
commitdcf2ebc020257bc298d948fcb4da761c284e84d7 (patch)
tree5e1ee6dc29480f7b26cd39bf9a9bd0d6759bfdaa /redfish-core/lib/log_services.hpp
parent104f09c95af2b3068e7afd655e4cebcad2bf0617 (diff)
downloadbmcweb-dcf2ebc020257bc298d948fcb4da761c284e84d7.tar.xz
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
Diffstat (limited to 'redfish-core/lib/log_services.hpp')
-rw-r--r--redfish-core/lib/log_services.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index f35db24723..9f40725d61 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -3364,12 +3364,8 @@ inline static bool parsePostCode(const std::string& postCodeID,
// 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)