nfc-read-forum-tag3 & nfc-relay-picc: remove unused variable
Fix cppcheck warnings [utils/nfc-read-forum-tag3.c:281]: (style) Variable 'len' is assigned a value that is never used [utils/nfc-relay-picc.c:392]: (style) Variable 'res' is assigned a value that is never used
This commit is contained in:
parent
4822bb3e42
commit
3f5a3fd58f
2 changed files with 2 additions and 4 deletions
|
@ -278,9 +278,8 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
uint8_t data[1024];
|
uint8_t data[1024];
|
||||||
size_t data_len = sizeof(data);
|
size_t data_len = sizeof(data);
|
||||||
int len;
|
|
||||||
|
|
||||||
if (0 >= (len = nfc_forum_tag_type3_check(pnd, nt, 0, 1, data, &data_len))) {
|
if (nfc_forum_tag_type3_check(pnd, nt, 0, 1, data, &data_len) <= 0) {
|
||||||
nfc_perror(pnd, "nfc_forum_tag_type3_check");
|
nfc_perror(pnd, "nfc_forum_tag_type3_check");
|
||||||
fclose(ndef_stream);
|
fclose(ndef_stream);
|
||||||
nfc_close(pnd);
|
nfc_close(pnd);
|
||||||
|
|
|
@ -389,8 +389,7 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("NFC emulator device: %s opened\n", nfc_device_get_name(pndTarget));
|
printf("NFC emulator device: %s opened\n", nfc_device_get_name(pndTarget));
|
||||||
int res;
|
if (nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0) < 0) {
|
||||||
if ((res = nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0)) < 0) {
|
|
||||||
ERR("%s", "Initialization of NFC emulator failed");
|
ERR("%s", "Initialization of NFC emulator failed");
|
||||||
if (!target_only_mode) {
|
if (!target_only_mode) {
|
||||||
nfc_close(pndInitiator);
|
nfc_close(pndInitiator);
|
||||||
|
|
Loading…
Add table
Reference in a new issue