Verify return of nfc_device_set_property_bool()
Problem reported by Coverity CID 1090319 (#1 of 1): Unchecked return value (CHECKED_RETURN) unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_EASY_FRAMING, nt.nti.nai.btSak & 0x20)". CID 1090320 (#1 of 1): Unchecked return value (CHECKED_RETURN) unchecked_value: No check of the return value of "nfc_device_set_property_bool(dev, NP_HANDLE_CRC, false)". CID 1090324 (#1 of 2): Unchecked return value (CHECKED_RETURN) unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, true)". CID 1090325 (#1 of 1): Unchecked return value (CHECKED_RETURN) unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_AUTO_ISO14443_4, false)".
This commit is contained in:
parent
ddf58f2d69
commit
d9b531f50f
2 changed files with 20 additions and 4 deletions
|
|
@ -280,8 +280,14 @@ get_rats(void)
|
|||
res = nfc_initiator_transceive_bytes(pnd, abtRats, sizeof(abtRats), abtRx, sizeof(abtRx), 0);
|
||||
if (res > 0) {
|
||||
// ISO14443-4 card, turn RF field off/on to access ISO14443-3 again
|
||||
nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false);
|
||||
nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, true);
|
||||
if (nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, false) < 0) {
|
||||
nfc_perror(pnd, "nfc_configure");
|
||||
return -1;
|
||||
}
|
||||
if (nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, true) < 0) {
|
||||
nfc_perror(pnd, "nfc_configure");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
// Reselect tag
|
||||
if (nfc_initiator_select_passive_target(pnd, nmMifare, NULL, 0, &nt) <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue