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 /plugins/MirOTR/src/utils.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 'plugins/MirOTR/src/utils.cpp')
-rw-r--r-- | plugins/MirOTR/src/utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 0dfc5a2407..d8e5e968e1 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -68,7 +68,7 @@ void VerifyFingerprintMessage(ConnContext *context, bool verify) { MCONTACT hContact = (MCONTACT)context->app_data; TCHAR msg[1024]; - mir_sntprintf(msg, SIZEOF(msg), (verify)?TranslateT(LANG_FINGERPRINT_VERIFIED):TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT(hContact)); + mir_sntprintf(msg, _countof(msg), (verify)?TranslateT(LANG_FINGERPRINT_VERIFIED):TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT(hContact)); ShowMessage(hContact, msg); SetEncryptionStatus(hContact, otr_context_get_trust(context)); } @@ -155,7 +155,7 @@ void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTA if ( !options.bHavePopups) { TCHAR title[256]; - mir_sntprintf(title, SIZEOF(title), _T("%s Message"), _T(MODULENAME)); + mir_sntprintf(title, _countof(title), _T("%s Message"), _T(MODULENAME)); if(line1 && line2) { int size = int(mir_tstrlen(line1) + mir_tstrlen(line2) + 3); @@ -205,7 +205,7 @@ void ShowWarning(TCHAR *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, SIZEOF(buffer), _T("%s Warning"), _T(MODULENAME)); + mir_sntprintf(buffer, _countof(buffer), _T("%s Warning"), _T(MODULENAME)); TCHAR *message; switch(disp) { @@ -251,7 +251,7 @@ void ShowError(TCHAR *msg) { if(disp == ED_POP && !options.bHavePopups) disp = ED_BAL; if(disp == ED_BAL && !ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) disp = ED_MB; - mir_sntprintf(buffer, SIZEOF(buffer), _T("%s Error"), _T(MODULENAME)); + mir_sntprintf(buffer, _countof(buffer), _T("%s Error"), _T(MODULENAME)); TCHAR *message; |