mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
less hardcoded sizes and more ARRAYLEN
This commit is contained in:
parent
74288ad128
commit
f276dca3f1
16 changed files with 43 additions and 53 deletions
|
@ -139,14 +139,13 @@ static const manufactureName manufactureMapping[] = {
|
|||
const char *getTagInfo(uint8_t uid) {
|
||||
|
||||
int i;
|
||||
int len = sizeof(manufactureMapping) / sizeof(manufactureName);
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
for (i = 0; i < ARRAYLEN(manufactureMapping); ++i)
|
||||
if (uid == manufactureMapping[i].uid)
|
||||
return manufactureMapping[i].desc;
|
||||
|
||||
//No match, return default
|
||||
return manufactureMapping[len - 1].desc;
|
||||
return manufactureMapping[ARRAYLEN(manufactureMapping) - 1].desc;
|
||||
}
|
||||
|
||||
// iso14a apdu input frame length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue