summaryrefslogtreecommitdiff
path: root/plugins/SMS/src/recvdlg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-06 10:23:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-06 10:23:34 +0000
commit77778c2b9236077c7e79f06aa798affa2f90a1db (patch)
tree84522dfa63e6f5982614e61a0b1ff2467620d441 /plugins/SMS/src/recvdlg.cpp
parent70cbc6e77f935b7116c1080033f5d7d5b604b5a7 (diff)
fix for some warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@14023 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SMS/src/recvdlg.cpp')
-rw-r--r--plugins/SMS/src/recvdlg.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp
index 0409ba6693..f8f401f26f 100644
--- a/plugins/SMS/src/recvdlg.cpp
+++ b/plugins/SMS/src/recvdlg.cpp
@@ -166,7 +166,7 @@ INT_PTR CALLBACK RecvSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l
//This function create a new SMS receive window, and insert it to the list.
//The function gets void and return the window HWND
-HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,size_t dwPhoneSize,LPSTR lpszMessage,size_t dwMessageSize)
+HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, size_t dwPhoneSize, LPSTR lpszMessage, size_t dwMessageSize)
{
HWND hRet = NULL;
@@ -207,22 +207,21 @@ HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,size
hIcon=(HICON)LoadImage(ssSMSSettings.hInstance,MAKEINTRESOURCE(iIcon),IMAGE_ICON,0,0,LR_SHARED);
break;
default:
- lpwszTitlepart=_T("Unknown event type");
+ lpwszTitlepart = _T("Unknown event type");
hIcon = 0;
}
- wszPhoneLocal[0]='+';
+ wszPhoneLocal[0] = '+';
if (dwPhoneSize)
- {
- dwPhoneSize=CopyNumberW((wszPhoneLocal+1),lpwszPhone,dwPhoneSize);
- }else{
+ dwPhoneSize = CopyNumberW((wszPhoneLocal+1),lpwszPhone,dwPhoneSize);
+ else {
GetDataFromMessage(lpszMessage,dwMessageSize,NULL,(wszPhoneLocal+1),(SIZEOF(wszPhoneLocal)-1),&dwPhoneSize,NULL);
dwPhoneSize++;
}
- lpwszContactDisplayName=GetContactNameW(hContact);
- mir_sntprintf(wszTitle,SIZEOF(wszTitle),_T("%s - %s"),lpwszContactDisplayName,lpwszTitlepart);
- MultiByteToWideChar(CP_UTF8,0,lpszMessage,dwMessageSize,lpwszMessage,(dwMessageSize+MAX_PATH));
+ lpwszContactDisplayName = GetContactNameW(hContact);
+ mir_sntprintf(wszTitle, SIZEOF(wszTitle),_T("%s - %s"), lpwszContactDisplayName, lpwszTitlepart);
+ MultiByteToWideChar(CP_UTF8, 0, lpszMessage, (int)dwMessageSize, lpwszMessage, (int)dwMessageSize+MAX_PATH);
SetWindowText(prswdWindowData->hWnd, wszTitle);
SetDlgItemText(prswdWindowData->hWnd,IDC_NAME,lpwszContactDisplayName);
@@ -232,9 +231,8 @@ HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,size
SetFocus(GetDlgItem(prswdWindowData->hWnd,IDC_MESSAGE));
hRet=prswdWindowData->hWnd;
- }else{
- MEMFREE(prswdWindowData);
}
+ else MEMFREE(prswdWindowData);
}
MEMFREE(lpwszMessage);
return(hRet);