diff options
author | nxf38293 <lokanathareddy.virayagarri@nxp.com> | 2019-03-14 14:44:39 +0530 |
---|---|---|
committer | nxf24591 <nanjesh.s_1@nxp.com> | 2019-03-28 12:48:47 +0530 |
commit | 7c82421be89db7bf04d03f3b754cc54639f512d9 (patch) | |
tree | 244ef900ea7700ce87588b74b9dde02348d788f5 /halimpl/utils/phNxpConfig.cpp | |
parent | 2f026a44bbdd9195e67a25229c8bd6d5110522b1 (diff) |
Coverity warnings clean up
Diffstat (limited to 'halimpl/utils/phNxpConfig.cpp')
-rwxr-xr-x | halimpl/utils/phNxpConfig.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/halimpl/utils/phNxpConfig.cpp b/halimpl/utils/phNxpConfig.cpp index 2b3e551..ba36e50 100755 --- a/halimpl/utils/phNxpConfig.cpp +++ b/halimpl/utils/phNxpConfig.cpp @@ -788,7 +788,9 @@ bool CNfcConfig::isModified() { } uint32_t stored_crc32 = 0; - fread(&stored_crc32, sizeof(uint32_t), 1, fd); + if (fread(&stored_crc32, sizeof(uint32_t), 1, fd) != 1) + ALOGE("%s Failed to Read file", __func__); + fclose(fd); return stored_crc32 != config_crc32_; @@ -809,7 +811,9 @@ bool CNfcConfig::isModified(const char* pName) { } uint32_t stored_crc32 = 0; - fread(&stored_crc32, sizeof(uint32_t), 1, fd); + if (fread(&stored_crc32, sizeof(uint32_t), 1, fd) != 1) + ALOGE("%s Failed to Read file", __func__); + fclose(fd); if(isRfFile) |