mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
remove some cppcheck warnings
This commit is contained in:
parent
dd9005719a
commit
1ebfa897c8
24 changed files with 145 additions and 146 deletions
|
@ -237,7 +237,6 @@ int CmdLFKeri(const char *Cmd) {
|
|||
int detectKeri(uint8_t *dest, size_t *size, bool *invert) {
|
||||
|
||||
uint8_t preamble[] = {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
|
||||
uint8_t preamble_i[] = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
|
||||
|
||||
// sanity check.
|
||||
if (*size < sizeof(preamble) + 100) return -1;
|
||||
|
@ -247,6 +246,7 @@ int detectKeri(uint8_t *dest, size_t *size, bool *invert) {
|
|||
if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx)) {
|
||||
|
||||
// if didn't find preamble try again inverting
|
||||
uint8_t preamble_i[] = {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0};
|
||||
if (!preambleSearch(DemodBuffer, preamble_i, sizeof(preamble_i), size, &startIdx))
|
||||
return -2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue