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/JabberG/src/jabber_adhoc.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/JabberG/src/jabber_adhoc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_adhoc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 723b45a43a..348f7cabf5 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -385,7 +385,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA dat->proto->AdHoc_RequestListOfCommands(pStartupParams->m_szJid, hwndDlg);
TCHAR Caption[512];
- mir_sntprintf(Caption, SIZEOF(Caption), TranslateT("Jabber Ad-Hoc commands at %s"), dat->ResponderJID);
+ mir_sntprintf(Caption, _countof(Caption), TranslateT("Jabber Ad-Hoc commands at %s"), dat->ResponderJID);
SetWindowText(hwndDlg, Caption);
}
else {
@@ -398,7 +398,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA SetDlgItemText(hwndDlg, IDC_SUBMIT, TranslateT("OK"));
TCHAR Caption[512];
- mir_sntprintf(Caption, SIZEOF(Caption), TranslateT("Sending Ad-Hoc command to %s"), dat->ResponderJID);
+ mir_sntprintf(Caption, _countof(Caption), TranslateT("Sending Ad-Hoc command to %s"), dat->ResponderJID);
SetWindowText(hwndDlg, Caption);
}
@@ -541,8 +541,8 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam) if (selected > 0) {
JABBER_RESOURCE_STATUS *r = item->arResources[selected - 1];
if (r) {
- mir_tstrncat(jid, _T("/"), SIZEOF(jid) - mir_tstrlen(jid));
- mir_tstrncat(jid, r->m_tszResourceName, SIZEOF(jid) - mir_tstrlen(jid));
+ mir_tstrncat(jid, _T("/"), _countof(jid) - mir_tstrlen(jid));
+ mir_tstrncat(jid, r->m_tszResourceName, _countof(jid) - mir_tstrlen(jid));
}
selected = 1;
}
|