Implement bugprone-branch-clone compliance
As part of getting the clang-tidy bugprone tests running, these
conditionals were found to have duplicate entries, or be somewhat
nonsensical.
Tested: clang-tidy now passes with the branch-compliance check set.
Change-Id: Ibec106f3bbd866fc471a1fc56bd8cdd5d44024e0
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index f8d5d4a..6bb09d0 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -1112,23 +1112,7 @@
thisElement = &response.back();
}
- if (typeCode == "s")
- {
- r = readMessageItem<char*>(typeCode, m, *thisElement);
- if (r < 0)
- {
- return r;
- }
- }
- else if (typeCode == "g")
- {
- r = readMessageItem<char*>(typeCode, m, *thisElement);
- if (r < 0)
- {
- return r;
- }
- }
- else if (typeCode == "o")
+ if (typeCode == "s" || typeCode == "g" || typeCode == "o")
{
r = readMessageItem<char*>(typeCode, m, *thisElement);
if (r < 0)