diff options
author | chakradhar <v.pogiri@samsung.com> | 2019-02-16 20:55:45 +0530 |
---|---|---|
committer | chakradhar <v.pogiri@samsung.com> | 2019-02-16 20:55:45 +0530 |
commit | 3c24315dc3c53bea9230daa99c9b4c8c38779c39 (patch) | |
tree | 40b638bfdf50b000133c3c82ca040d318f60708d | |
parent | 0f5d63e576b502e752fc739df2c68b39f8229be9 (diff) | |
download | msg-service-3c24315dc3c53bea9230daa99c9b4c8c38779c39.tar.gz msg-service-3c24315dc3c53bea9230daa99c9b4c8c38779c39.tar.bz2 msg-service-3c24315dc3c53bea9230daa99c9b4c8c38779c39.zip |
svace issues
Change-Id: I552c95ec8c1da4ec5fe9062a47cbaeb90339cd05
-rwxr-xr-x | utils/MsgUtilFile.cpp | 2 | ||||
-rwxr-xr-x | utils/MsgUtilStorage.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/utils/MsgUtilFile.cpp b/utils/MsgUtilFile.cpp index c748e0e..7285d6e 100755 --- a/utils/MsgUtilFile.cpp +++ b/utils/MsgUtilFile.cpp @@ -355,7 +355,7 @@ bool MsgCreateFileName(char *pFileName) bool MsgOpenAndReadFile(const char *pFileName, char **ppData, int *pDataSize) { if (!pFileName || !ppData || !pDataSize) { - MSG_ERR("Invalid params!! pFileName=%s, ppData=%s, pDataSize=%p", pFileName, *ppData, (void *)pDataSize); + MSG_ERR("Invalid params"); return false; } diff --git a/utils/MsgUtilStorage.cpp b/utils/MsgUtilStorage.cpp index 0f2e607..b025f95 100755 --- a/utils/MsgUtilStorage.cpp +++ b/utils/MsgUtilStorage.cpp @@ -1319,6 +1319,16 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread memset(sqlQuery, 0x00, sizeof(sqlQuery)); snprintf(sqlQuery, sizeof(sqlQuery), "UPDATE %s SET DISPLAY_NAME = ? WHERE CONV_ID = %d;", MSGFW_CONVERSATION_TABLE_NAME, convId); + + for (int j = 0; j < addressList.nCount; j++) { + msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j]; + delete (MSG_ADDRESS_INFO_S *)pStruct->data; + delete (msg_struct_s *)pStruct; + } + + if (addressList.msg_struct_info != NULL) { + g_free((msg_struct_t *)addressList.msg_struct_info); + } if (pDbHandle->prepareQuery(sqlQuery) != MSG_SUCCESS) { MSG_DEBUG("Query Failed [%s]", sqlQuery); @@ -1335,16 +1345,6 @@ msg_error_t MsgStoSetConversationDisplayName(MsgDbHandler *pDbHandle, msg_thread pDbHandle->finalizeQuery(); - for (int j = 0; j < addressList.nCount; j++) { - msg_struct_s *pStruct = (msg_struct_s *)addressList.msg_struct_info[j]; - delete (MSG_ADDRESS_INFO_S *)pStruct->data; - delete (msg_struct_s *)pStruct; - } - - if (addressList.msg_struct_info != NULL) { - g_free((msg_struct_t *)addressList.msg_struct_info); - } - return err; } |