mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Avoid useless loop by moving check to the default case
This commit is contained in:
parent
b314d1ef1c
commit
8543db11b5
1 changed files with 7 additions and 8 deletions
|
@ -1264,13 +1264,6 @@ void annotateMfPlus(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
data_size = cmdsize - (data - cmd);
|
||||
}
|
||||
|
||||
// Messages for commands that do not need args are treated first
|
||||
const char *annotation = mfpGetAnnotationForCode(cmd[pos]) ;
|
||||
if (annotation != NULL) {
|
||||
snprintf(exp, size, "%s", annotation) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
switch (cmd[pos]) {
|
||||
case MFP_AUTHENTICATEFIRST:
|
||||
case MFP_AUTHENTICATEFIRST_VARIANT:
|
||||
|
@ -1407,7 +1400,13 @@ void annotateMfPlus(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
break;
|
||||
|
||||
default:
|
||||
// Messages for commands that do not need args are treated here
|
||||
const char *annotation = mfpGetAnnotationForCode(cmd[pos]) ;
|
||||
if (annotation != NULL) {
|
||||
snprintf(exp, size, "%s", annotation) ;
|
||||
} else {
|
||||
found_annotation = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (found_annotation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue