From bd44868535ff9b92457aa4cd91a05c63b320c167 Mon Sep 17 00:00:00 2001 From: kamaljeet chauhan Date: Wed, 18 Mar 2020 19:31:20 +0530 Subject: [PATCH] Coverity related changes Change-Id: I3788ad9133cb8b6b4047b30b799af1339c0357f0 Signed-off-by: kamaljeet chauhan --- plugin/sms_plugin/3gpp2/Sms3gpp2Setting.cpp | 3 ++- plugin/sms_plugin/3gpp2/Sms3gpp2Transport.cpp | 3 ++- proxy/MsgHandleSetting.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/sms_plugin/3gpp2/Sms3gpp2Setting.cpp b/plugin/sms_plugin/3gpp2/Sms3gpp2Setting.cpp index 2fa34ed..1c582d5 100755 --- a/plugin/sms_plugin/3gpp2/Sms3gpp2Setting.cpp +++ b/plugin/sms_plugin/3gpp2/Sms3gpp2Setting.cpp @@ -98,7 +98,8 @@ void Sms3gpp2Setting::initializeSimInfo(TapiHandle *handle) MSG_DEBUG("tel_get_sim_imsi() Error![%d]", tapiRet); } - MsgSettingSetString(MSG_SIM_IMSI, imsi); + if (MsgSettingSetString(MSG_SIM_IMSI, imsi) != MSG_SUCCESS) + MSG_DEBUG("MsgSettingSetString failed"); if (pthread_create(&thd, NULL, &initSimInfo, handle) < 0) { MSG_ERR("pthread_create() error"); diff --git a/plugin/sms_plugin/3gpp2/Sms3gpp2Transport.cpp b/plugin/sms_plugin/3gpp2/Sms3gpp2Transport.cpp index d0facae..5d09046 100755 --- a/plugin/sms_plugin/3gpp2/Sms3gpp2Transport.cpp +++ b/plugin/sms_plugin/3gpp2/Sms3gpp2Transport.cpp @@ -197,7 +197,8 @@ unsigned char Sms3gpp2Transport::getSubmitMsgId() { msgSubmitId = ((msgSubmitId + 1) % SMS_MAX_MESSAGE_ID); - MsgSettingSetInt(MSG_MESSAGE_ID_COUNTER, msgSubmitId); + if (MsgSettingSetInt(MSG_MESSAGE_ID_COUNTER, msgSubmitId) != MSG_SUCCESS) + MSG_DEBUG("MsgSettingSetInt failed"); return msgSubmitId; } diff --git a/proxy/MsgHandleSetting.cpp b/proxy/MsgHandleSetting.cpp index da80acb..e76f27f 100755 --- a/proxy/MsgHandleSetting.cpp +++ b/proxy/MsgHandleSetting.cpp @@ -532,7 +532,7 @@ msg_error_t MsgHandle::getMmsRecvOpt(msg_struct_t msg_struct) } if (pEvent->result == MSG_SUCCESS) { - memcpy(mms_recv_opt->data, pEvent->data, sizeof(MSG_MMS_RECVOPT_S)); + memcpy(mms_recv_opt->data, pEvent->data, sizeof(pEvent->data)); } return pEvent->result; -- 2.34.1