summaryrefslogtreecommitdiff
path: root/src/core/stduihist
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 /src/core/stduihist
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 'src/core/stduihist')
-rw-r--r--src/core/stduihist/src/history.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp
index 0748d76e54..78ed1a68e8 100644
--- a/src/core/stduihist/src/history.cpp
+++ b/src/core/stduihist/src/history.cpp
@@ -162,10 +162,10 @@ static void FillHistoryThread(void* param)
db_event_get(hDbEvent, &dbei);
TCHAR str[200], eventText[256], strdatetime[64];
- GetObjectSummary(&dbei, str, SIZEOF(str));
+ GetObjectSummary(&dbei, str, _countof(str));
if (str[0]) {
- TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, SIZEOF(strdatetime), 0);
- mir_sntprintf(eventText, SIZEOF(eventText), _T("%s: %s"), strdatetime, str);
+ TimeZone_PrintTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, _countof(strdatetime), 0);
+ mir_sntprintf(eventText, _countof(eventText), _T("%s: %s"), strdatetime, str);
i = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)eventText);
SendMessage(hwndList, LB_SETITEMDATA, i, (LPARAM)hDbEvent);
}
@@ -208,7 +208,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
{
TCHAR* contactName, str[200];
contactName = pcli->pfnGetContactDisplayName(hContact, 0);
- mir_sntprintf(str, SIZEOF(str), TranslateT("History for %s"), contactName);
+ mir_sntprintf(str, _countof(str), TranslateT("History for %s"), contactName);
SetWindowText(hwndDlg, str);
}
Window_SetIcon_IcoLib(hwndDlg, SKINICON_OTHER_HISTORY);
@@ -289,7 +289,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei) == 0) {
TCHAR str[8192];
- GetObjectDescription(&dbei, str, SIZEOF(str));
+ GetObjectDescription(&dbei, str, _countof(str));
if (str[0])
SetDlgItemText(hwndDlg, IDC_EDIT, str);
}
@@ -327,7 +327,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
db_event_get(hDbEvent, &dbei);
TCHAR str[1024];
- GetObjectDescription(&dbei, str, SIZEOF(str));
+ GetObjectDescription(&dbei, str, _countof(str));
if (str[0]) {
CharUpperBuff(str, (int)mir_tstrlen(str));
if (_tcsstr(str, (const TCHAR*)lParam) != NULL) {
@@ -361,7 +361,7 @@ static INT_PTR CALLBACK DlgProcHistoryFind(HWND hwndDlg, UINT msg, WPARAM wParam
case IDOK://find Next
TCHAR str[128];
HWND hwndParent = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- GetDlgItemText(hwndDlg, IDC_FINDWHAT, str, SIZEOF(str));
+ GetDlgItemText(hwndDlg, IDC_FINDWHAT, str, _countof(str));
CharUpperBuff(str, (int)mir_tstrlen(str));
SendMessage(hwndParent, DM_FINDNEXT, 0, (LPARAM)str);
return TRUE;