mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07: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) {
|
void MifareG4ReadBlk(uint8_t blockno, uint8_t *pwd, uint8_t workFlags) {
|
||||||
|
bool setup = ((workFlags & MAGIC_INIT) == MAGIC_INIT) ;
|
||||||
bool setup = workFlags & MAGIC_INIT & 0xFF ;
|
bool done = ((workFlags & MAGIC_OFF) == MAGIC_OFF) ;
|
||||||
bool done = workFlags & MAGIC_OFF & 0xFF ;
|
|
||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
int retval = PM3_SUCCESS;
|
int retval = PM3_SUCCESS;
|
||||||
|
@ -2756,8 +2755,8 @@ OUT:
|
||||||
}
|
}
|
||||||
|
|
||||||
void MifareG4WriteBlk(uint8_t blockno, uint8_t *pwd, uint8_t *data, uint8_t workFlags) {
|
void MifareG4WriteBlk(uint8_t blockno, uint8_t *pwd, uint8_t *data, uint8_t workFlags) {
|
||||||
bool setup = workFlags & MAGIC_INIT & 0xFF ;
|
bool setup = ((workFlags & MAGIC_INIT) == MAGIC_INIT) ;
|
||||||
bool done = workFlags & MAGIC_OFF & 0xFF ;
|
bool done = ((workFlags & MAGIC_OFF) == MAGIC_OFF) ;
|
||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
int retval = PM3_SUCCESS;
|
int retval = PM3_SUCCESS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue