summaryrefslogtreecommitdiff
path: root/plugins/YahooGroups
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/YahooGroups
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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 'plugins/YahooGroups')
-rw-r--r--plugins/YahooGroups/src/services.cpp2
-rw-r--r--plugins/YahooGroups/src/utils.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/YahooGroups/src/services.cpp b/plugins/YahooGroups/src/services.cpp
index fe79736be4..8bb381621f 100644
--- a/plugins/YahooGroups/src/services.cpp
+++ b/plugins/YahooGroups/src/services.cpp
@@ -95,7 +95,7 @@ void AddNewGroup(const char *newGroup)
char group[1024];
*group = 1;
- strncpy_s((group + 1), (SIZEOF(group) - 1), newGroup, _TRUNCATE);
+ strncpy_s((group + 1), (_countof(group) - 1), newGroup, _TRUNCATE);
mir_snprintf(tmp, "%d", index);
const int MAX_SIZE = 1024;
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp
index 9f6f63d865..f4dd3fd7c1 100644
--- a/plugins/YahooGroups/src/utils.cpp
+++ b/plugins/YahooGroups/src/utils.cpp
@@ -271,7 +271,7 @@ TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
case CNFT_BYTE:
{
- mir_sntprintf(tmp, SIZEOF(tmp), _T("%d"), ctInfo.bVal);
+ mir_sntprintf(tmp, _countof(tmp), _T("%d"), ctInfo.bVal);
buffer = _tcsdup(tmp);
break;
@@ -279,7 +279,7 @@ TCHAR *GetContactID(MCONTACT hContact, char *szProto)
case CNFT_WORD:
{
- mir_sntprintf(tmp, SIZEOF(tmp), _T("%d"), ctInfo.wVal);
+ mir_sntprintf(tmp, _countof(tmp), _T("%d"), ctInfo.wVal);
buffer = _tcsdup(tmp);
break;
@@ -287,7 +287,7 @@ TCHAR *GetContactID(MCONTACT hContact, char *szProto)
case CNFT_DWORD:
{
- mir_sntprintf(tmp, SIZEOF(tmp), _T("%ld"), ctInfo.dVal);
+ mir_sntprintf(tmp, _countof(tmp), _T("%ld"), ctInfo.dVal);
buffer = _tcsdup(tmp);
break;
@@ -327,7 +327,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
szHandle = GetContactID(hContact, cProtocol);
tmp = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
- _tcsncpy(dispName, tmp, SIZEOF(dispName));
+ _tcsncpy(dispName, tmp, _countof(dispName));
if ((szHandle) && ((mir_tstrcmpi(szHandle, szID) == 0) || (mir_tstrcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0)))
found = 1;