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_misc.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_misc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 6c9372874b..e0961c2a9f 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -61,8 +61,8 @@ int JabberCompareJids(const TCHAR *jid1, const TCHAR *jid2) // match only node@domain part
TCHAR szTempJid1[JABBER_MAX_JID_LEN], szTempJid2[JABBER_MAX_JID_LEN];
return mir_tstrcmpi(
- JabberStripJid(jid1, szTempJid1, SIZEOF(szTempJid1)),
- JabberStripJid(jid2, szTempJid2, SIZEOF(szTempJid2)));
+ JabberStripJid(jid1, szTempJid1, _countof(szTempJid1)),
+ JabberStripJid(jid2, szTempJid2, _countof(szTempJid2)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -361,14 +361,14 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) int i;
// search through known software list
- for (i = 0; i < SIZEOF(sttCapsNodeToName_Map); i++)
+ for (i = 0; i < _countof(sttCapsNodeToName_Map); i++)
if (_tcsstr(resource->m_tszCapsNode, sttCapsNodeToName_Map[i].node)) {
res.Format(_T("%s %s"), sttCapsNodeToName_Map[i].name, resource->m_tszCapsVer);
break;
}
// unknown software
- if (i == SIZEOF(sttCapsNodeToName_Map))
+ if (i == _countof(sttCapsNodeToName_Map))
res.Format(_T("%s %s"), resource->m_tszCapsNode, resource->m_tszCapsVer);
}
@@ -407,9 +407,9 @@ void CJabberProto::UpdateMirVer(MCONTACT hContact, pResourceStatus &resource) TCHAR szFullJid[JABBER_MAX_JID_LEN];
if (resource->m_tszResourceName && !_tcschr(jid, '/'))
- mir_sntprintf(szFullJid, SIZEOF(szFullJid), _T("%s/%s"), jid, resource->m_tszResourceName);
+ mir_sntprintf(szFullJid, _countof(szFullJid), _T("%s/%s"), jid, resource->m_tszResourceName);
else
- mir_tstrncpy(szFullJid, jid, SIZEOF(szFullJid));
+ mir_tstrncpy(szFullJid, jid, _countof(szFullJid));
setTString(hContact, DBSETTING_DISPLAY_UID, szFullJid);
}
|