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
|
@ -40,10 +40,9 @@ static const PlusErrorsElm PlusErrors[] = {
|
|||
{0x0f, "General Manipulation Error. Failure in the operation of the PICC (cannot write to the data block), etc."},
|
||||
{0x90, "OK"},
|
||||
};
|
||||
int PlusErrorsLen = sizeof(PlusErrors) / sizeof(PlusErrorsElm);
|
||||
|
||||
const char *mfpGetErrorDescription(uint8_t errorCode) {
|
||||
for (int i = 0; i < PlusErrorsLen; i++)
|
||||
for (int i = 0; i < ARRAYLEN(PlusErrors); i++)
|
||||
if (errorCode == PlusErrors[i].Code)
|
||||
return PlusErrors[i].Description;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue