mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 09:39:16 +08:00
cppchecker - too many shifts
This commit is contained in:
parent
5acd681f8f
commit
10243d9bce
1 changed files with 6 additions and 6 deletions
|
@ -36,21 +36,21 @@ bool set_bit_by_position(wiegand_message_t *data, bool value, uint8_t pos) {
|
||||||
return false;
|
return false;
|
||||||
} else if (pos > 63) {
|
} else if (pos > 63) {
|
||||||
if (value)
|
if (value)
|
||||||
data->Top |= (1 << (pos - 64));
|
data->Top |= (1UL << (pos - 64));
|
||||||
else
|
else
|
||||||
data->Top &= ~(1 << (pos - 64));
|
data->Top &= ~(1UL << (pos - 64));
|
||||||
return true;
|
return true;
|
||||||
} else if (pos > 31) {
|
} else if (pos > 31) {
|
||||||
if (value)
|
if (value)
|
||||||
data->Mid |= (1 << (pos - 32));
|
data->Mid |= (1UL << (pos - 32));
|
||||||
else
|
else
|
||||||
data->Mid &= ~(1 << (pos - 32));
|
data->Mid &= ~(1UL << (pos - 32));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (value)
|
if (value)
|
||||||
data->Bot |= (1 << pos);
|
data->Bot |= (1UL << pos);
|
||||||
else
|
else
|
||||||
data->Bot &= ~(1 << pos);
|
data->Bot &= ~(1UL << pos);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue