From: kamaljeet Date: Sat, 16 Feb 2019 13:27:26 +0000 (+0530) Subject: coverity issue msg-service X-Git-Tag: accepted/tizen/unified/20190218.064017^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F199936%2F1;p=platform%2Fcore%2Fmessaging%2Fmsg-service.git coverity issue msg-service Change-Id: I83a34434e2a340362ea5f660925e27ea764ae3f9 Signed-off-by: kamaljeet --- diff --git a/framework/storage-handler/MsgStorageMessage.cpp b/framework/storage-handler/MsgStorageMessage.cpp index 1957858..477d4b6 100755 --- a/framework/storage-handler/MsgStorageMessage.cpp +++ b/framework/storage-handler/MsgStorageMessage.cpp @@ -1752,10 +1752,7 @@ msg_error_t MsgStoMoveMessageToFolder(msg_message_id_t msgId, msg_folder_id_t de memset(sqlQuery, 0x00, sizeof(sqlQuery)); - if (msgType.mainType == MSG_SMS_TYPE) - snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId); - else - snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId); + snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET FOLDER_ID = %d WHERE MSG_ID = %d;", MSGFW_MESSAGE_TABLE_NAME, destFolderId, msgId); if (dbHandle->execQuery(sqlQuery) != MSG_SUCCESS) return MSG_ERR_DB_EXEC; diff --git a/utils/MsgCallStatusManager.cpp b/utils/MsgCallStatusManager.cpp index 6a44693..2c79093 100644 --- a/utils/MsgCallStatusManager.cpp +++ b/utils/MsgCallStatusManager.cpp @@ -33,10 +33,14 @@ static void call_status_change_received(GDBusConnection *connection, const gchar if (g_strcmp0(signal_name, CALL_MGR_MEMBER_NAME) == 0) { g_variant_get(parameters, "(iis)", &call_status, NULL, NULL); MSG_INFO("callStatus = [%d]", call_status); - if (call_status == 0) - MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 0); //call not active - else - MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 1); //call active ( call_status: 2 [Ringing], call_status: 1 [In call]) + if (call_status == 0) { + if (MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 0) != 0) + MSG_FATAL("Fail to set value \n"); //call not active + } + else { + if (MsgSettingSetInt(MSG_MESSAGE_DURING_CALL, 1) != 0) + MSG_FATAL("Fail to set value \n"); //call active ( call_status: 2 [Ringing], call_status: 1 [In call]) + } } }