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/NotifyAnything/src/options.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/NotifyAnything/src') diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 51ceaef1df..109654a678 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -57,7 +57,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case NA_LOG_BROWSE: if (HIWORD(wParam) == BN_CLICKED) { TCHAR szTemp[MAX_PATH + 1], szTemp1[MAX_PATH + 1], szProfileDir[MAX_PATH + 1]; - GetDlgItemText(hwndDlg, NA_LOG_FILENAME, szTemp, SIZEOF(szTemp)); + GetDlgItemText(hwndDlg, NA_LOG_FILENAME, szTemp, _countof(szTemp)); OPENFILENAME ofn = { 0 }; ofn.lStructSize = sizeof(ofn); ofn.lpstrFile = szTemp; @@ -108,7 +108,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara s.allow_execute = IsDlgButtonChecked(hwndDlg, NA_ALLOW_EXECUTE) != BST_UNCHECKED; TCHAR buf[1000]; - if (!GetDlgItemText(hwndDlg, NA_PORT, buf, SIZEOF(buf))) + if (!GetDlgItemText(hwndDlg, NA_PORT, buf, _countof(buf))) buf[0] = '\0'; int port = _ttoi(buf); if (port <= 0 || port > 65535) @@ -116,7 +116,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else s.port = port; - if (!GetDlgItemText(hwndDlg, NA_PASSWORD, buf, SIZEOF(buf))) + if (!GetDlgItemText(hwndDlg, NA_PASSWORD, buf, _countof(buf))) buf[0] = '\0'; s.password = buf; -- cgit v1.2.3