Commit 3f5a3fd5 authored by Philippe Teuwen's avatar Philippe Teuwen

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
parent 4822bb3e
......@@ -278,9 +278,8 @@ main(int argc, char *argv[])
uint8_t data[1024];
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");
fclose(ndef_stream);
nfc_close(pnd);
......
......@@ -389,8 +389,7 @@ main(int argc, char *argv[])
}
printf("NFC emulator device: %s opened\n", nfc_device_get_name(pndTarget));
int res;
if ((res = nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0)) < 0) {
if (nfc_target_init(pndTarget, &ntEmulatedTarget, abtCapdu, sizeof(abtCapdu), 0) < 0) {
ERR("%s", "Initialization of NFC emulator failed");
if (!target_only_mode) {
nfc_close(pndInitiator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment