summaryrefslogtreecommitdiff
path: root/src/core/stdidle
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/stdidle
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/stdidle')
-rw-r--r--src/core/stdidle/src/idle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/stdidle/src/idle.cpp b/src/core/stdidle/src/idle.cpp
index 169d95148c..5a536dabc9 100644
--- a/src/core/stdidle/src/idle.cpp
+++ b/src/core/stdidle/src/idle.cpp
@@ -236,7 +236,7 @@ void CALLBACK IdleTimer(HWND, UINT, UINT_PTR idEvent, DWORD)
int IdleGetStatusIndex(WORD status)
{
- for (int j = 0; j < SIZEOF(aa_Status); j++)
+ for (int j = 0; j < _countof(aa_Status); j++)
if (aa_Status[j] == status)
return j;
@@ -267,7 +267,7 @@ static INT_PTR CALLBACK IdleOptsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
SendDlgItemMessage(hwndDlg, IDC_IDLE1STTIME, EM_LIMITTEXT, (WPARAM)2, 0);
CheckDlgButton(hwndDlg, IDC_AASHORTIDLE, db_get_b(NULL, IDLEMOD, IDL_AAENABLE, 0) ? BST_CHECKED : BST_UNCHECKED);
- for (j = 0; j < SIZEOF(aa_Status); j++)
+ for (j = 0; j < _countof(aa_Status); j++)
SendDlgItemMessage(hwndDlg, IDC_AASTATUS, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetStatusModeDescription(aa_Status[j], 0));
j = IdleGetStatusIndex((WORD)(db_get_w(NULL, IDLEMOD, IDL_AASTATUS, 0)));