summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/log.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/IcqOscarJ/src/log.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/IcqOscarJ/src/log.cpp')
-rw-r--r--protocols/IcqOscarJ/src/log.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/IcqOscarJ/src/log.cpp b/protocols/IcqOscarJ/src/log.cpp
index cd3b3297de..644fef9e5c 100644
--- a/protocols/IcqOscarJ/src/log.cpp
+++ b/protocols/IcqOscarJ/src/log.cpp
@@ -119,14 +119,14 @@ void CIcqProto::icq_LogUsingErrorCode(int level, DWORD dwError, const char *szMs
default:
TCHAR err[512];
- if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, 0, err, SIZEOF(err), NULL)) {
+ if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, 0, err, _countof(err), NULL)) {
pszErrorMsg = make_utf8_string(err);
bNeedFree = TRUE;
}
break;
}
- mir_snprintf(szBuf, SIZEOF(szBuf), "%s%s%s (%s %d)",
+ mir_snprintf(szBuf, _countof(szBuf), "%s%s%s (%s %d)",
szMsg ? ICQTranslateUtfStatic(szMsg, str, 1024) : "",
szMsg ? "\r\n\r\n" : "",
ICQTranslateUtfStatic(pszErrorMsg, szErrorMsg, 512),
@@ -144,6 +144,6 @@ void CIcqProto::icq_LogFatalParam(const char *szMsg, WORD wError)
char str[MAX_PATH];
char buf[MAX_PATH];
- mir_snprintf(buf, ICQTranslateUtfStatic(szMsg, str, SIZEOF(str)), wError);
+ mir_snprintf(buf, ICQTranslateUtfStatic(szMsg, str, _countof(str)), wError);
icq_LogMessage(LOG_FATAL, buf);
}