diff options
Diffstat (limited to 'redfish-core/include/utils/hex_utils.hpp')
-rw-r--r-- | redfish-core/include/utils/hex_utils.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/include/utils/hex_utils.hpp b/redfish-core/include/utils/hex_utils.hpp index f3728ea892..07ef4c8dfd 100644 --- a/redfish-core/include/utils/hex_utils.hpp +++ b/redfish-core/include/utils/hex_utils.hpp @@ -43,11 +43,11 @@ inline uint8_t hexCharToNibble(char ch) } else if (ch >= 'A' && ch <= 'F') { - rc = static_cast<uint8_t>(ch) - 'A' + 10; + rc = static_cast<uint8_t>(ch - 'A') + 10U; } else if (ch >= 'a' && ch <= 'f') { - rc = static_cast<uint8_t>(ch) - 'a' + 10; + rc = static_cast<uint8_t>(ch - 'a') + 10U; } return rc; |