summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_menu.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/MSN/src/msn_menu.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/MSN/src/msn_menu.cpp')
-rw-r--r--protocols/MSN/src/msn_menu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index 3899dc8cf8..e257a86e54 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -93,7 +93,7 @@ INT_PTR CMsnProto::MsnViewProfile(WPARAM hContact, LPARAM)
}
char tUrl[256];
- mir_snprintf(tUrl, SIZEOF(tUrl), "http://cid-%I64X.profiles.live.com", _atoi64(cid));
+ mir_snprintf(tUrl, _countof(tUrl), "http://cid-%I64X.profiles.live.com", _atoi64(cid));
MsnInvokeMyURL(false, tUrl);
return 0;
}
@@ -181,7 +181,7 @@ INT_PTR CMsnProto::MsnSendNetMeeting(WPARAM wParam, LPARAM)
char msg[1024];
- mir_snprintf(msg, SIZEOF(msg),
+ mir_snprintf(msg, _countof(msg),
"Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n\r\n"
"Application-Name: NetMeeting\r\n"
"Application-GUID: {44BBA842-CC51-11CF-AAFA-00AA00B6015C}\r\n"
@@ -232,7 +232,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam
CMsnProto *proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (proto->msnLoggedIn) {
TCHAR str[130];
- GetDlgItemText(hwndDlg, IDC_NICKNAME, str, SIZEOF(str));
+ GetDlgItemText(hwndDlg, IDC_NICKNAME, str, _countof(str));
proto->MSN_SendNickname(str);
}
}
@@ -349,7 +349,7 @@ void CMsnProto::MSN_EnableMenuItems(bool bEnable)
if (!bEnable)
mi.flags |= CMIF_GRAYED;
- for (int i = 0; i < SIZEOF(menuItemsMain); i++)
+ for (int i = 0; i < _countof(menuItemsMain); i++)
if (menuItemsMain[i] != NULL)
Menu_ModifyItem(menuItemsMain[i], &mi);