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/AutoShutdown/src/settingsdlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/AutoShutdown/src/settingsdlg.cpp') diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 207cdbaad2..89cdb08aed 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -45,7 +45,7 @@ static BOOL CALLBACK DisplayCpuUsageProc(BYTE nCpuUsage,LPARAM lParam) /* dialog closed? */ if (!IsWindow((HWND)lParam)) return FALSE; /* stop poll thread */ TCHAR str[64]; - mir_sntprintf(str,SIZEOF(str),TranslateT("(current: %u%%)"),nCpuUsage); + mir_sntprintf(str,_countof(str),TranslateT("(current: %u%%)"),nCpuUsage); SetWindowText((HWND)lParam,str); return TRUE; } @@ -116,8 +116,8 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR HWND hwndCombo=GetDlgItem(hwndDlg,IDC_COMBO_COUNTDOWNUNIT); DWORD lastUnit=db_get_dw(NULL,"AutoShutdown","CountdownUnit",SETTING_COUNTDOWNUNIT_DEFAULT); SendMessage(hwndCombo,CB_SETLOCALE,(WPARAM)locale,0); /* sort order */ - SendMessage(hwndCombo,CB_INITSTORAGE,SIZEOF(unitNames),SIZEOF(unitNames)*16); /* approx. */ - for(int i=0;i