From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/services.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/AimOscar/src/services.cpp') 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; } -- cgit v1.2.3