From 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sun, 30 Nov 2014 18:33:56 +0000 Subject: Fix buf size for Get/Set text, open/save file name SMS: SIZE_T -> size_t MRA: small code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@11175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/src/ui.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/Twitter') diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index 7f9a582836..27ee2f4553 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -81,7 +81,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM char str[128]; TCHAR tstr[128]; - GetDlgItemTextA(hwndDlg, IDC_SERVER, str, sizeof(str) - 1); + GetDlgItemTextA(hwndDlg, IDC_SERVER, str, SIZEOF(str) - 1); if (str[strlen(str) - 1] != '/') strncat(str, "/", sizeof(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str); @@ -225,21 +225,21 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar proto = reinterpret_cast(GetWindowLongPtr(hwndDlg, GWLP_USERDATA)); char str[128]; - GetDlgItemTextA(hwndDlg, IDC_UN, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_UN, str, SIZEOF(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_UN, str); - /*GetDlgItemTextA(hwndDlg,IDC_PW,str,sizeof(str)); + /*GetDlgItemTextA(hwndDlg,IDC_PW,str,SIZEOF(str)); CallService(MS_DB_CRYPT_ENCODESTRING,sizeof(str),reinterpret_cast(str)); db_set_s(0,proto->ModuleName(),TWITTER_KEY_PASS,str);*/ - GetDlgItemTextA(hwndDlg, IDC_BASEURL, str, sizeof(str) - 1); + GetDlgItemTextA(hwndDlg, IDC_BASEURL, str, SIZEOF(str) - 1); if (str[strlen(str) - 1] != '/') strncat(str, "/", sizeof(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_BASEURL, str); db_set_b(0, proto->ModuleName(), TWITTER_KEY_CHATFEED, IsDlgButtonChecked(hwndDlg, IDC_CHATFEED)); - GetDlgItemTextA(hwndDlg, IDC_POLLRATE, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_POLLRATE, str, SIZEOF(str)); int rate = atoi(str); if (rate == 0) rate = 80; @@ -263,7 +263,7 @@ namespace popup_options return -1; else if (IsDlgButtonChecked(hwndDlg, IDC_TIMEOUT_CUSTOM)) { char str[32]; - GetDlgItemTextA(hwndDlg, IDC_TIMEOUT, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_TIMEOUT, str, SIZEOF(str)); return atoi(str); } else // Default checked (probably) @@ -481,7 +481,7 @@ INT_PTR CALLBACK pin_proc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) proto = reinterpret_cast(GetWindowLongPtr(hwndDlg, GWLP_USERDATA)); char str[128]; - GetDlgItemTextA(hwndDlg, IDC_PIN, str, sizeof(str)); + GetDlgItemTextA(hwndDlg, IDC_PIN, str, SIZEOF(str)); db_set_s(0, proto->ModuleName(), TWITTER_KEY_OAUTH_PIN, str); EndDialog(hwndDlg, wParam); -- cgit v1.2.3