Skip to content

Commit 13053e1

Browse files
committed
resolve maybe-uninitialized
1 parent ddaa6de commit 13053e1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

client/src/cmdhffelica.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,8 +2589,11 @@ static int CmdHFFelicaAuthenticationLite(const char *Cmd) {
25892589
uint8_t flags = (FELICA_APPEND_CRC | FELICA_RAW | FELICA_NO_DISCONNECT);
25902590

25912591
felica_status_response_t sres;
2592-
bool error = (send_wr_plain(flags, datalen, data, false, &sres) != PM3_SUCCESS);
2593-
if (error && sres.status_flags.status_flag1[0] != 0x00 && sres.status_flags.status_flag2[0] != 0x00) {
2592+
if (send_wr_plain(flags, datalen, data, false, &sres) != PM3_SUCCESS) {
2593+
return PM3_ERFTRANS;
2594+
}
2595+
2596+
if (sres.status_flags.status_flag1[0] != 0x00 && sres.status_flags.status_flag2[0] != 0x00) {
25942597
PrintAndLogEx(ERR, "\nError RC Write");
25952598
return PM3_ERFTRANS;
25962599
}

0 commit comments

Comments
 (0)