summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraAdvancedSearch.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/MRA/src/MraAdvancedSearch.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/MraAdvancedSearch.cpp')
-rw-r--r--protocols/MRA/src/MraAdvancedSearch.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MRA/src/MraAdvancedSearch.cpp b/protocols/MRA/src/MraAdvancedSearch.cpp
index 94d201356e..42cc03beb1 100644
--- a/protocols/MRA/src/MraAdvancedSearch.cpp
+++ b/protocols/MRA/src/MraAdvancedSearch.cpp
@@ -80,7 +80,7 @@ void InitComboBoxNumders(HWND hWndCombo, DWORD dwStart, DWORD dwEnd)
for (DWORD i = dwStart; i <= dwEnd; i++) {
TCHAR szBuff[MAX_PATH];
- mir_sntprintf(szBuff, SIZEOF(szBuff), _T("%lu"), i);
+ mir_sntprintf(szBuff, _countof(szBuff), _T("%lu"), i);
DWORD dwItem = SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)szBuff);
SendMessage(hWndCombo, CB_SETITEMDATA, dwItem, i);
}
@@ -106,7 +106,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg, UINT message, WPARAM wParam
HWND hWndCombo = GetDlgItem(hWndDlg, IDC_EMAIL_DOMAIN);
ResetComboBox(hWndCombo);
for (size_t i = 0; lpcszMailRuDomains[i]; i++) {
- MultiByteToWideChar(MRA_CODE_PAGE, 0, lpcszMailRuDomains[i], -1, wszBuff, SIZEOF(wszBuff));
+ MultiByteToWideChar(MRA_CODE_PAGE, 0, lpcszMailRuDomains[i], -1, wszBuff, _countof(wszBuff));
SendMessage(hWndCombo, CB_ADDSTRING, 0, (LPARAM)wszBuff);
}
@@ -260,20 +260,20 @@ HWND CMraProto::SearchAdvanced(HWND hWndDlg)
char szUser[MAX_PATH], szDomain[MAX_PATH];
TCHAR wszNickName[MAX_PATH], wszFirstName[MAX_PATH], wszLastName[MAX_PATH];
- size_t dwUserSize = GetDlgItemTextA(hWndDlg, IDC_EMAIL_USER, szUser, SIZEOF(szUser));
- size_t dwDomainSize = GetDlgItemTextA(hWndDlg, IDC_EMAIL_DOMAIN, szDomain, SIZEOF(szDomain));
+ size_t dwUserSize = GetDlgItemTextA(hWndDlg, IDC_EMAIL_USER, szUser, _countof(szUser));
+ size_t dwDomainSize = GetDlgItemTextA(hWndDlg, IDC_EMAIL_DOMAIN, szDomain, _countof(szDomain));
if (dwUserSize && dwDomainSize) {
SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_USER);
SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_DOMAIN);
}
- size_t dwNickNameSize = GetDlgItemText(hWndDlg, IDC_NICK, wszNickName, SIZEOF(wszNickName));
+ size_t dwNickNameSize = GetDlgItemText(hWndDlg, IDC_NICK, wszNickName, _countof(wszNickName));
if (dwNickNameSize) SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_NICKNAME);
- size_t dwFirstNameSize = GetDlgItemText(hWndDlg, IDC_FIRSTNAME, wszFirstName, SIZEOF(wszFirstName));
+ size_t dwFirstNameSize = GetDlgItemText(hWndDlg, IDC_FIRSTNAME, wszFirstName, _countof(wszFirstName));
if (dwFirstNameSize) SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_FIRSTNAME);
- size_t dwLastNameSize = GetDlgItemText(hWndDlg, IDC_LASTNAME, wszLastName, SIZEOF(wszLastName));
+ size_t dwLastNameSize = GetDlgItemText(hWndDlg, IDC_LASTNAME, wszLastName, _countof(wszLastName));
if (dwLastNameSize) SetBit(dwRequestFlags, MRIM_CS_WP_REQUEST_PARAM_LASTNAME);
DWORD dwSex = GET_CURRENT_COMBO_DATA(hWndDlg, IDC_GENDER);