diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/JabberG/src/jabber_util.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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/JabberG/src/jabber_util.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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) {
|