summaryrefslogtreecommitdiff
path: root/plugins/Exchange/src/dlg_handlers.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 /plugins/Exchange/src/dlg_handlers.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 'plugins/Exchange/src/dlg_handlers.cpp')
-rw-r--r--plugins/Exchange/src/dlg_handlers.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp
index 754cefb113..badc63fc33 100644
--- a/plugins/Exchange/src/dlg_handlers.cpp
+++ b/plugins/Exchange/src/dlg_handlers.cpp
@@ -41,13 +41,13 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
int bCheck = db_get_b(NULL, ModuleName, "Check", 1);
TCHAR buffer[4096];
- GetStringFromDatabase("Username", _T(""), buffer, SIZEOF(buffer));
+ GetStringFromDatabase("Username", _T(""), buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_USER_EDIT, buffer);
- GetStringFromDatabase("Password", _T(""), buffer, SIZEOF(buffer));
+ GetStringFromDatabase("Password", _T(""), buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_PASSWORD_EDIT, buffer);
- GetStringFromDatabase("Server", _T(""), buffer, SIZEOF(buffer));
+ GetStringFromDatabase("Server", _T(""), buffer, _countof(buffer));
SetDlgItemText(hWnd, IDC_SERVER_EDIT, buffer);
SetDlgItemInt(hWnd, IDC_PORT_EDIT, db_get_dw(NULL, ModuleName, "Port", EXCHANGE_PORT), FALSE);
@@ -111,16 +111,16 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
db_set_b(NULL, ModuleName, "Check", IsDlgButtonChecked(hWnd, IDC_CHECK_EMAILS));
TCHAR buffer[4096];
- GetDlgItemText(hWnd, IDC_USER_EDIT, buffer, SIZEOF(buffer));
+ GetDlgItemText(hWnd, IDC_USER_EDIT, buffer, _countof(buffer));
db_set_ts(NULL, ModuleName, "Username", buffer);
- GetDlgItemText(hWnd, IDC_PASSWORD_EDIT, buffer, SIZEOF(buffer));
+ GetDlgItemText(hWnd, IDC_PASSWORD_EDIT, buffer, _countof(buffer));
db_set_ts(NULL, ModuleName, "Password", buffer);
- GetDlgItemText(hWnd, IDC_SERVER_EDIT, buffer, SIZEOF(buffer));
+ GetDlgItemText(hWnd, IDC_SERVER_EDIT, buffer, _countof(buffer));
db_set_ts(NULL, ModuleName, "Server", buffer);
- GetDlgItemText(hWnd, IDC_PORT_EDIT, buffer, SIZEOF(buffer));
+ GetDlgItemText(hWnd, IDC_PORT_EDIT, buffer, _countof(buffer));
db_set_dw(NULL, ModuleName, "Port", GetDlgItemInt(hWnd,IDC_PORT_EDIT,NULL,FALSE));
db_set_dw(NULL, ModuleName, "Interval", GetDlgItemInt(hWnd,IDC_INTERVAL_EDIT,NULL,FALSE));
@@ -174,7 +174,7 @@ int CALLBACK ListSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
for (int i = 0; i < count; i++) {
if (ListView_GetItemState(hWnd, i, LVIS_SELECTED)) {
TCHAR emailID[4096]; //uhh
- ListView_GetItemText(hWnd, i, 2, emailID, SIZEOF(emailID));
+ ListView_GetItemText(hWnd, i, 2, emailID, _countof(emailID));
exchangeServer.OpenMessage(emailID);
}
}
@@ -303,7 +303,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
item.iItem = i;
item.mask = LVIF_TEXT;
item.iSubItem = 2;
- item.cchTextMax = SIZEOF(emailID);
+ item.cchTextMax = _countof(emailID);
item.pszText = emailID;
ListView_GetItem(hList, &item);
exchangeServer.MarkEmailAsRead(emailID);