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/JabberG/src/jabber_util.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/JabberG/src/jabber_util.cpp') diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 059015f155..a709bc492c 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -542,8 +542,8 @@ int __stdcall JabberGetPacketID(HXML n) { const TCHAR *str = xmlGetAttrValue(n, _T("id")); if (str) - if (!_tcsncmp(str, _T(JABBER_IQID), SIZEOF(JABBER_IQID) - 1)) - return _ttoi(str + SIZEOF(JABBER_IQID) - 1); + if (!_tcsncmp(str, _T(JABBER_IQID), _countof(JABBER_IQID) - 1)) + return _ttoi(str + _countof(JABBER_IQID) - 1); return -1; } @@ -941,7 +941,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) if (getByte(ai.hContact, "AvatarType", PA_FORMAT_UNKNOWN) != (unsigned char)pictureType) { TCHAR tszFileName[MAX_PATH]; - GetAvatarFileName(ai.hContact, tszFileName, SIZEOF(tszFileName)); + GetAvatarFileName(ai.hContact, tszFileName, _countof(tszFileName)); DeleteFile(tszFileName); } @@ -958,7 +958,7 @@ void __cdecl CJabberProto::LoadHttpAvatars(void* param) ptrA cmpsha(getStringA(ai.hContact, "AvatarSaved")); if (cmpsha == NULL || strnicmp(cmpsha, buffer, sizeof(buffer))) { TCHAR tszFileName[MAX_PATH]; - GetAvatarFileName(ai.hContact, tszFileName, SIZEOF(tszFileName)); + GetAvatarFileName(ai.hContact, tszFileName, _countof(tszFileName)); _tcsncpy_s(ai.filename, tszFileName, _TRUNCATE); FILE* out = _tfopen(tszFileName, _T("wb")); if (out != NULL) { -- cgit v1.2.3