mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
cppchecker fixes
This commit is contained in:
parent
603e288c4f
commit
4620c0b21e
6 changed files with 41 additions and 46 deletions
|
@ -15,18 +15,15 @@
|
|||
|
||||
extern const uint8_t OddByteParity[256];
|
||||
|
||||
|
||||
static inline bool oddparity8(const uint8_t x) {
|
||||
static inline uint8_t oddparity8(const uint8_t x) {
|
||||
return OddByteParity[x];
|
||||
}
|
||||
|
||||
|
||||
static inline bool evenparity8(const uint8_t x) {
|
||||
static inline uint8_t evenparity8(const uint8_t x) {
|
||||
return !OddByteParity[x];
|
||||
}
|
||||
|
||||
|
||||
static inline bool evenparity32(uint32_t x) {
|
||||
static inline uint8_t evenparity32(uint32_t x) {
|
||||
#if !defined __GNUC__
|
||||
x ^= x >> 16;
|
||||
x ^= x >> 8;
|
||||
|
@ -36,8 +33,7 @@ static inline bool evenparity32(uint32_t x) {
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
static inline bool oddparity32(uint32_t x) {
|
||||
static inline uint8_t oddparity32(uint32_t x) {
|
||||
#if !defined __GNUC__
|
||||
x ^= x >> 16;
|
||||
x ^= x >> 8;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue