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/MRA/src/Mra_svcs.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/MRA/src/Mra_svcs.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_svcs.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 4d27ea4e4e..44b6dde3ac 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -353,13 +353,13 @@ DWORD CMraProto::MraSetXStatusInternal(DWORD dwXStatus) // obsolete (TODO: remove in next version)
char szValueName[MAX_PATH];
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldName", dwXStatus);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldName", dwXStatus);
if (!mraGetStringW(NULL, szValueName, szBuff))
szBuff = lpcszXStatusNameDef[dwXStatus];
mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, szBuff);
// obsolete (TODO: remove in next version)
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldMsg", dwXStatus);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldMsg", dwXStatus);
if (mraGetStringW(NULL, szValueName, szBuff))
mraSetStringExW(NULL, DBSETTING_XSTATUSMSG, szBuff);
else
@@ -401,7 +401,7 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM, LPARAM lParam) // set custom status name
if (pData->flags & CSSF_MASK_NAME) {
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldName", dwXStatus);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldName", dwXStatus);
if (pData->flags & CSSF_UNICODE) {
mraSetStringExW(NULL, szValueName, pData->pwszName);
mraSetStringExW(NULL, DBSETTING_XSTATUSNAME, pData->pwszName);
@@ -414,7 +414,7 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM, LPARAM lParam) // set custom status message
if (pData->flags & CSSF_MASK_MESSAGE) {
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldMsg", dwXStatus);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldMsg", dwXStatus);
if (pData->flags & CSSF_UNICODE) {
mraSetStringExW(NULL, szValueName, pData->pwszMessage);
mraSetStringExW(NULL, DBSETTING_XSTATUSMSG, pData->pwszMessage);
@@ -528,7 +528,7 @@ DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const C if (IsXStatusValid(dwXStatusMir)) {
char szValueName[MAX_PATH];
if (pwszStatusTitle.IsEmpty()) {
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldName", dwXStatusMir);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldName", dwXStatusMir);
// custom xstatus name
if (!mraGetStringW(NULL, szValueName, wszStatusTitle))
wszStatusTitle = TranslateTS(lpcszXStatusNameDef[dwXStatusMir]);
@@ -536,7 +536,7 @@ DWORD CMraProto::MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const C else wszStatusTitle = pwszStatusTitle;
if (pwszStatusDesc.IsEmpty()) {
- mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%ldMsg", dwXStatusMir);
+ mir_snprintf(szValueName, _countof(szValueName), "XStatus%ldMsg", dwXStatusMir);
// custom xstatus description
mraGetStringW(NULL, szValueName, wszStatusDesc);
}
|