From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StatusPlugins/confirmdialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/StatusPlugins/confirmdialog.cpp') diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 03b9943ca2..5b5ecca46d 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -269,7 +269,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP // LAST STATUS if (proto->status == ID_STATUS_LAST) { TCHAR last[80]; - mir_sntprintf(last, SIZEOF(last), _T("%s (%s)"), TranslateT(""), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0)); + mir_sntprintf(last, _countof(last), _T("%s (%s)"), TranslateT(""), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0)); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, last); actualStatus = proto->lastStatus; } @@ -278,7 +278,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else if (proto->status == ID_STATUS_CURRENT) { int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0); TCHAR current[80]; - mir_sntprintf(current, SIZEOF(current), _T("%s (%s)"), TranslateT(""), pcli->pfnGetStatusModeDescription(currentStatus, 0)); + mir_sntprintf(current, _countof(current), _T("%s (%s)"), TranslateT(""), pcli->pfnGetStatusModeDescription(currentStatus, 0)); ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, current); actualStatus = currentStatus; } @@ -362,7 +362,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP actualStatus = currentStatus; } - for (int i = 0; i < SIZEOF(statusModeList); i++) { + for (int i = 0; i < _countof(statusModeList); i++) { if (((flags & statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)& Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i]))))) { TCHAR *statusMode = pcli->pfnGetStatusModeDescription(statusModeList[i], 0); item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode); -- cgit v1.2.3