diff options
author | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-06 21:09:01 -0400 |
commit | 9e3dca25c7197c39a815ce39da670a4232212a45 (patch) | |
tree | 06282ebe4c88e0f840320cf8b8584eab8550fec2 /src/lib/codec | |
parent | aff93b716eda9d10be9f02e4b436b672510ab179 (diff) |
Address some bool/int conversion warnings from Sonar
Nothing major but probably good to clean these up.
Diffstat (limited to 'src/lib/codec')
-rw-r--r-- | src/lib/codec/hex/hex.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/codec/hex/hex.cpp b/src/lib/codec/hex/hex.cpp index 8d8d3ff49..6bbd7c28e 100644 --- a/src/lib/codec/hex/hex.cpp +++ b/src/lib/codec/hex/hex.cpp @@ -114,7 +114,10 @@ size_t hex_decode(uint8_t output[], bad_char + "'"); } - *out_ptr |= bin << (top_nibble*4); + if(top_nibble) + *out_ptr |= bin << 4; + else + *out_ptr |= bin; top_nibble = !top_nibble; if(top_nibble) |