mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-16 01:53:02 +08:00
style: extract flags
This commit is contained in:
parent
ee3e4968d3
commit
fa95119171
1 changed files with 4 additions and 5 deletions
|
@ -2685,9 +2685,8 @@ OUT:
|
|||
}
|
||||
|
||||
void MifareG4ReadBlk(uint8_t blockno, uint8_t *pwd, uint8_t workFlags) {
|
||||
|
||||
bool setup = workFlags & MAGIC_INIT & 0xFF ;
|
||||
bool done = workFlags & MAGIC_OFF & 0xFF ;
|
||||
bool setup = ((workFlags & MAGIC_INIT) == MAGIC_INIT) ;
|
||||
bool done = ((workFlags & MAGIC_OFF) == MAGIC_OFF) ;
|
||||
|
||||
int res = 0;
|
||||
int retval = PM3_SUCCESS;
|
||||
|
@ -2756,8 +2755,8 @@ OUT:
|
|||
}
|
||||
|
||||
void MifareG4WriteBlk(uint8_t blockno, uint8_t *pwd, uint8_t *data, uint8_t workFlags) {
|
||||
bool setup = workFlags & MAGIC_INIT & 0xFF ;
|
||||
bool done = workFlags & MAGIC_OFF & 0xFF ;
|
||||
bool setup = ((workFlags & MAGIC_INIT) == MAGIC_INIT) ;
|
||||
bool done = ((workFlags & MAGIC_OFF) == MAGIC_OFF) ;
|
||||
|
||||
int res = 0;
|
||||
int retval = PM3_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue