summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src/tlen.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/Tlen/src/tlen.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/Tlen/src/tlen.cpp')
-rw-r--r--protocols/Tlen/src/tlen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 8ae89022a8..5667c73c3c 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -86,7 +86,7 @@ static IconItem iconList[] =
static HANDLE GetIconHandle(int iconId)
{
- for (int i = 0; i < SIZEOF(iconList); i++)
+ for (int i = 0; i < _countof(iconList); i++)
if (iconList[i].defIconID == iconId)
return iconList[i].hIcolib;
@@ -108,7 +108,7 @@ void ReleaseIcolibIcon(HICON hIcon) {
static void TlenRegisterIcons()
{
- Icon_Register(hInst, "Protocols/Tlen", iconList, SIZEOF(iconList), "TLEN");
+ Icon_Register(hInst, "Protocols/Tlen", iconList, _countof(iconList), "TLEN");
}
int TlenProtocol::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
@@ -189,7 +189,7 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM wParam, LPARAM lParam)
memset(&cookie, 0, sizeof(cookie));
if (login != NULL && password != NULL) {
- mir_snprintf( form, SIZEOF(form), "username=%s&password=%s", login, password);
+ mir_snprintf( form, _countof(form), "username=%s&password=%s", login, password);
headers[0].szName = "Content-Type";
headers[0].szValue = "application/x-www-form-urlencoded";
memset(&req, 0, sizeof(req));
@@ -225,7 +225,7 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM wParam, LPARAM lParam)
}
mir_free(login);
mir_free(password);
- mir_snprintf(szFileName, SIZEOF(szFileName), "http://poczta.o2.pl/login.html?sid=%s", cookie);
+ mir_snprintf(szFileName, _countof(szFileName), "http://poczta.o2.pl/login.html?sid=%s", cookie);
CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szFileName);
return 0;
}