mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
simpler
This commit is contained in:
parent
a7b7e0ba9b
commit
1dfd2f5127
1 changed files with 7 additions and 11 deletions
|
@ -1694,20 +1694,16 @@ static void unlock_add_item(em4x05_unlock_item_t *array, uint8_t len, uint32_t v
|
|||
|
||||
uint8_t i = 0;
|
||||
for (; i < len; i++) {
|
||||
if ( array[i].cnt == 0)
|
||||
break;
|
||||
|
||||
if ( array[i].value == value) {
|
||||
if ( array[i].value == value ) {
|
||||
array[i].cnt++;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if ( array[i].cnt == 0 ) {
|
||||
array[i].cnt++;
|
||||
array[i].value = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i >= len )
|
||||
return;
|
||||
|
||||
array[i].cnt++;
|
||||
array[i].value = value;
|
||||
}
|
||||
|
||||
static int CmdEM4x05Unlock(const char *Cmd) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue