diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/NotifyAnything/src/options.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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 'plugins/NotifyAnything/src/options.cpp')
-rw-r--r-- | plugins/NotifyAnything/src/options.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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;
|