summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/services.cpp
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 /protocols/AimOscar/src/services.cpp
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 'protocols/AimOscar/src/services.cpp')
-rw-r--r--protocols/AimOscar/src/services.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp
index 9d5b86d317..cfa55973a1 100644
--- a/protocols/AimOscar/src/services.cpp
+++ b/protocols/AimOscar/src/services.cpp
@@ -346,7 +346,7 @@ INT_PTR CAimProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
if (getByte(AIM_KEY_DA, 0)) return GAIR_NOAVATAR;
- switch (get_avatar_filename(pai->hContact, pai->filename, SIZEOF(pai->filename), NULL))
+ switch (get_avatar_filename(pai->hContact, pai->filename, _countof(pai->filename), NULL))
{
case GAIR_SUCCESS:
if (!(wParam & GAIF_FORCE) || state != 1 )
@@ -479,12 +479,12 @@ INT_PTR CAimProto::SetAvatar(WPARAM, LPARAM lParam)
TCHAR tFileName[MAX_PATH];
TCHAR *ext = _tcsrchr(szFileName, '.');
- get_avatar_filename(NULL, tFileName, SIZEOF(tFileName), ext);
+ get_avatar_filename(NULL, tFileName, _countof(tFileName), ext);
int fileId = _topen(tFileName, _O_CREAT | _O_TRUNC | _O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE);
if (fileId < 0)
{
char errmsg[512];
- mir_snprintf(errmsg, SIZEOF(errmsg), "Cannot store avatar. File '%s' could not be created/overwritten", tFileName);
+ mir_snprintf(errmsg, _countof(errmsg), "Cannot store avatar. File '%s' could not be created/overwritten", tFileName);
ShowPopup(errmsg, ERROR_POPUP);
return 1;
}