[Non-ACR][UTC-ITC Fix] 31/176631/1
authorAbhishek Vijay <abhishek.v@samsung.com>
Fri, 20 Apr 2018 09:26:49 +0000 (14:56 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Fri, 20 Apr 2018 09:26:49 +0000 (14:56 +0530)
Change-Id: I99d441b13ed5e49a3db67d448ff7c3a9ea2294ed
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
utils/MsgUtilFunction.cpp

index e26b08d..0883576 100755 (executable)
@@ -552,25 +552,25 @@ int MsgEncodeThreadInfo(MSG_THREAD_VIEW_S *pThreadInfo, char **ppDest)
 /* Decoders */
 void MsgDecodeMsgId(char *pSrc, msg_message_id_t *pMsgId)
 {
-       memcpy(pMsgId, pSrc, sizeof(char)*2);
+       memcpy(pMsgId, pSrc, sizeof(msg_message_id_t));
 }
 
 
 void MsgDecodeCountInfo(char *pSrc, MSG_COUNT_INFO_S *pCountInfo)
 {
-       memcpy(pCountInfo, pSrc, sizeof(char)*2);
+       memcpy(pCountInfo, pSrc, sizeof(MSG_COUNT_INFO_S));
 }
 
 
 void MsgDecodeMemSize(char *pSrc, unsigned int *memsize)
 {
-       memcpy(memsize, pSrc, sizeof(char)*2);
+       memcpy(memsize, pSrc, sizeof(unsigned int));
 }
 
 
 void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo)
 {
-       memcpy(pMsgInfo, pSrc, sizeof(char)*2);
+       memcpy(pMsgInfo, pSrc, sizeof(MSG_MESSAGE_INFO_S));
 
        pSrc = pSrc + sizeof(MSG_MESSAGE_INFO_S);
 
@@ -587,7 +587,7 @@ void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo)
 
 void MsgDecodeMsgInfo(char *pSrc, MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S* pSendOptInfo)
 {
-       memcpy(pMsgInfo, pSrc, sizeof(char)*2);
+       memcpy(pMsgInfo, pSrc, sizeof(MSG_MESSAGE_INFO_S));
 
        pSrc = pSrc + sizeof(MSG_MESSAGE_INFO_S);
 
@@ -632,7 +632,7 @@ void MsgDecodeFolderList(char *pSrc, msg_struct_list_s *pFolderList)
 {
        int count = 0;
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
 
        if( count > 0 ) {
@@ -711,22 +711,22 @@ void      MsgDecodeContactCount(char *pSrc,  MSG_THREAD_COUNT_INFO_S *pMsgThreadCount
        if(pSrc == NULL)
                return;
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
        pMsgThreadCountList->totalCount = count;
 
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
        pMsgThreadCountList->unReadCount        = count;
 
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
        pMsgThreadCountList->mmsMsgCount        = count;
 
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
        pMsgThreadCountList->smsMsgCount        = count;
 
@@ -742,7 +742,7 @@ void MsgDecodeReportStatus(char *pSrc,  msg_struct_list_s *report_list)
        if(pSrc == NULL)
                return;
 
-       memcpy(&count, pSrc, sizeof(char)*2);
+       memcpy(&count, pSrc, sizeof(int));
        pSrc = pSrc + sizeof(int);
 
        report_list->nCount = count;
@@ -772,12 +772,12 @@ void MsgDecodeReportStatus(char *pSrc,  msg_struct_list_s *report_list)
 
 void MsgDecodeThreadId(char *pSrc, msg_thread_id_t *pThreadId)
 {
-       memcpy(pThreadId, pSrc, sizeof(char)*2);
+       memcpy(pThreadId, pSrc, sizeof(msg_thread_id_t));
 }
 
 void MsgDecodeThreadInfo(char *pSrc, MSG_THREAD_VIEW_S *pThreadInfo)
 {
-       memcpy(pThreadInfo, pSrc, sizeof(char)*2);
+       memcpy(pThreadInfo, pSrc, sizeof(MSG_THREAD_VIEW_S));
 }
 
 /* Event Encoder */