From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tlen/src/tlen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/Tlen/src/tlen.cpp') 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; } -- cgit v1.2.3