summaryrefslogtreecommitdiff
path: root/plugins/AddContactPlus/src
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/AddContactPlus/src
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/AddContactPlus/src')
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index a318776dfe..98630c1daf 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -196,7 +196,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
case IDC_USERID:
if (HIWORD(wparam) == EN_CHANGE) {
TCHAR szUserId[256];
- if (GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId))) {
+ if (GetDlgItemText(hdlg, IDC_USERID, szUserId, _countof(szUserId))) {
if (!IsWindowEnabled(GetDlgItem(hdlg, IDOK)))
EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
}
@@ -234,7 +234,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
case IDOK:
{
TCHAR szUserId[256];
- GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId));
+ GetDlgItemText(hdlg, IDC_USERID, szUserId, _countof(szUserId));
if (*rtrimt(szUserId) == 0 ||
(strstr(acs->proto, "GG") && _tcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol
@@ -256,7 +256,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
}
psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(TLEN_SEARCH_RESULT));
psr->cbSize = sizeof(TLEN_SEARCH_RESULT);
- mir_snprintf(((TLEN_SEARCH_RESULT*)psr)->jid, SIZEOF(((TLEN_SEARCH_RESULT*)psr)->jid), "%S", szUserId);
+ mir_snprintf(((TLEN_SEARCH_RESULT*)psr)->jid, _countof(((TLEN_SEARCH_RESULT*)psr)->jid), "%S", szUserId);
}
else {
psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(PROTOSEARCHRESULT));
@@ -276,7 +276,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
}
TCHAR szHandle[256];
- if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
+ if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, _countof(szHandle)))
db_set_ts(hContact, "CList", "MyHandle", szHandle);
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
@@ -297,7 +297,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM)
CallContactService(hContact, PSS_AUTHREQUEST, 0, 0);
else {
TCHAR tszReason[512];
- GetDlgItemText(hdlg, IDC_AUTHREQ, tszReason, SIZEOF(tszReason));
+ GetDlgItemText(hdlg, IDC_AUTHREQ, tszReason, _countof(tszReason));
CallContactService(hContact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
}
}