diff options
| author | nxf48293 <priyanka.rajput@nxp.com> | 2019-07-22 14:56:24 +0530 |
|---|---|---|
| committer | nxf35421 <sangeetha.agarwal@nxp.com> | 2019-08-14 15:32:35 +0530 |
| commit | cd510db38c3f17c8e5fda8b4bb3d47f65baa1b78 (patch) | |
| tree | b64a4f4378ca82d047a85994e598c4ffffa279f0 | |
| parent | 8d471c82c25a3231780b3ec21385c01efe43c84c (diff) | |
| download | android_vendor_nxp_opensource_external_libnfc-nci-cd510db38c3f17c8e5fda8b4bb3d47f65baa1b78.tar.gz android_vendor_nxp_opensource_external_libnfc-nci-cd510db38c3f17c8e5fda8b4bb3d47f65baa1b78.tar.bz2 android_vendor_nxp_opensource_external_libnfc-nci-cd510db38c3f17c8e5fda8b4bb3d47f65baa1b78.zip | |
Resolve the warnings reported by Klocwork
Warnings fixed: UNINIT, NULL_RETURN
| -rwxr-xr-x | SN100x/src/adaptation/NfcAdaptation.cc | 2 | ||||
| -rwxr-xr-x | SN100x/src/nfc/nfc/nfc_ncif.cc | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/SN100x/src/adaptation/NfcAdaptation.cc b/SN100x/src/adaptation/NfcAdaptation.cc index 4d99d5e..86ea48d 100755 --- a/SN100x/src/adaptation/NfcAdaptation.cc +++ b/SN100x/src/adaptation/NfcAdaptation.cc @@ -801,7 +801,7 @@ int NfcAdaptation::HalIoctlIntf(long arg, void* p_data) { ******************************************************************************/ void NfcAdaptation::GetNxpConfigs( std::map<std::string, ConfigValue>& configMap) { - nfc_nci_IoctlInOutData_t inpOutData; + nfc_nci_IoctlInOutData_t inpOutData = {}; std::string config; int ret = HalIoctlIntf(HAL_NFC_IOCTL_GET_NXP_CONFIG, &inpOutData); DLOG_IF(INFO, nfc_debug_enabled) diff --git a/SN100x/src/nfc/nfc/nfc_ncif.cc b/SN100x/src/nfc/nfc/nfc_ncif.cc index 9cba9a3..0afc5e0 100755 --- a/SN100x/src/nfc/nfc/nfc_ncif.cc +++ b/SN100x/src/nfc/nfc/nfc_ncif.cc @@ -1234,7 +1234,10 @@ void nfc_ncif_proc_ee_action(uint8_t* p, uint16_t plen) { tNFC_RESPONSE_CBACK* p_cback = nfc_cb.p_resp_cback; uint8_t data_len, ulen, tag, *p_data; uint8_t max_len; - + if (!p) { + LOG(ERROR) << StringPrintf("%s: Invalid p value\n", __func__); + return; + } if (p_cback) { memset(&evt_data.act_data, 0, sizeof(tNFC_ACTION_DATA)); evt_data.status = NFC_STATUS_OK; |
