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/IcqOscarJ/src/icq_proto.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/IcqOscarJ/src/icq_proto.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_proto.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 7b672381ea..f420108707 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -172,7 +172,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const TCHAR* aUserName) : m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
char szP2PModuleName[MAX_PATH];
- mir_snprintf(szP2PModuleName, SIZEOF(szP2PModuleName), "%sP2P", m_szModuleName);
+ mir_snprintf(szP2PModuleName, _countof(szP2PModuleName), "%sP2P", m_szModuleName);
mir_sntprintf(szBuffer, TranslateT("%s client-to-client connections"), m_tszUserName);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_TCHAR;
nlu.ptszDescriptiveName = szBuffer;
@@ -241,9 +241,9 @@ int CIcqProto::OnModulesLoaded(WPARAM, LPARAM) char pszSrvGroupsName[MAX_PATH];
char* modules[5] = { 0, 0, 0, 0, 0 };
- mir_snprintf(pszP2PName, SIZEOF(pszP2PName), "%sP2P", m_szModuleName);
- mir_snprintf(pszGroupsName, SIZEOF(pszGroupsName), "%sGroups", m_szModuleName);
- mir_snprintf(pszSrvGroupsName, SIZEOF(pszSrvGroupsName), "%sSrvGroups", m_szModuleName);
+ mir_snprintf(pszP2PName, _countof(pszP2PName), "%sP2P", m_szModuleName);
+ mir_snprintf(pszGroupsName, _countof(pszGroupsName), "%sGroups", m_szModuleName);
+ mir_snprintf(pszSrvGroupsName, _countof(pszSrvGroupsName), "%sSrvGroups", m_szModuleName);
modules[0] = m_szModuleName;
modules[1] = pszP2PName;
modules[2] = pszGroupsName;
@@ -1215,7 +1215,7 @@ HANDLE __cdecl CIcqProto::SendFile(MCONTACT hContact, const TCHAR* szDescription }
else {
char tmp[64];
- mir_snprintf(szFiles, SIZEOF(szFiles), ICQTranslateUtfStatic("%d Files", tmp, SIZEOF(tmp)), ft->dwFileCount);
+ mir_snprintf(szFiles, _countof(szFiles), ICQTranslateUtfStatic("%d Files", tmp, _countof(tmp)), ft->dwFileCount);
pszFiles = szFiles;
}
@@ -1857,11 +1857,11 @@ int __cdecl CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONERASE:
{
char szDbSetting[MAX_PATH];
- mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sP2P", m_szModuleName);
+ mir_snprintf(szDbSetting, _countof(szDbSetting), "%sP2P", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
- mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sSrvGroups", m_szModuleName);
+ mir_snprintf(szDbSetting, _countof(szDbSetting), "%sSrvGroups", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
- mir_snprintf(szDbSetting, SIZEOF(szDbSetting), "%sGroups", m_szModuleName);
+ mir_snprintf(szDbSetting, _countof(szDbSetting), "%sGroups", m_szModuleName);
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)szDbSetting);
}
break;
|