diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-11-30 18:33:56 +0000 |
commit | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch) | |
tree | ded36ec10c55fb5d33c8d2e471ec808eeb058a04 /protocols/Yahoo/src | |
parent | 237d02ebbabbedfb8b33160ebfb5250bbd491eca (diff) |
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
Diffstat (limited to 'protocols/Yahoo/src')
-rw-r--r-- | protocols/Yahoo/src/chat.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/options.cpp | 10 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Yahoo/src/search.cpp | 2 | ||||
-rw-r--r-- | protocols/Yahoo/src/services.cpp | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 7b25099304..9fcd34270a 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -551,7 +551,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDOK:
{
TCHAR msg[1024];
- GetDlgItemText(hwndDlg, IDC_MSG, msg, sizeof(msg));
+ GetDlgItemText(hwndDlg, IDC_MSG, msg, SIZEOF(msg));
HWND hwndList = GetDlgItem(hwndDlg, IDC_CCLIST);
YList *who = NULL;
diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp index 237f5e49ce..36459e2a96 100644 --- a/protocols/Yahoo/src/options.cpp +++ b/protocols/Yahoo/src/options.cpp @@ -97,7 +97,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, bool reconnectRequired = false; char str[128]; - GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, sizeof( str )); + GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, SIZEOF(str)); if (ppro->getString(YAHOO_LOGINID, &dbv)) { reconnectRequired = true; } @@ -108,7 +108,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } ppro->setString( YAHOO_LOGINID, str ); - GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, sizeof( str )); + GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); if (ppro->getString(YAHOO_PASSWORD, &dbv)) { reconnectRequired = true; } @@ -119,7 +119,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, } ppro->setString( YAHOO_PASSWORD, str ); - GetDlgItemTextA(hwndDlg, IDC_NICK, str, sizeof( str )); + GetDlgItemTextA(hwndDlg, IDC_NICK, str, SIZEOF(str)); if (str[0] == '\0') { @@ -213,7 +213,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar { bool reconnectRequired = false; char str[128]; - GetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, str, sizeof( str )); + GetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, str, SIZEOF(str)); DBVARIANT dbv; if (ppro->getString(YAHOO_LOGINSERVER, &dbv)) { @@ -303,7 +303,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wP MessageBox(hwndDlg, TranslateT("You need to be connected to Yahoo to add to Ignore List."), TranslateT("Yahoo Ignore"), MB_OK| MB_ICONINFORMATION); else { char id[128]; - int i = GetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, id, sizeof( id )); + int i = GetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, id, SIZEOF(id)); if (i < 3) { MessageBox(hwndDlg, TranslateT("Please enter a valid buddy name to ignore."), TranslateT("Yahoo Ignore"), MB_OK| MB_ICONINFORMATION); diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 2d635246bf..d192490718 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -769,7 +769,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM char str[128];
bool reconnectRequired = false;
- GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, sizeof(str));
+ GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, SIZEOF(str));
if (ppro->getString(YAHOO_LOGINID, &dbv)) {
reconnectRequired = true;
@@ -781,7 +781,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
ppro->setString(YAHOO_LOGINID, str);
- GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, sizeof(str));
+ GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str));
if (ppro->getString(YAHOO_PASSWORD, &dbv)) {
reconnectRequired = true;
diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp index 2b714bd3dd..065539b674 100644 --- a/protocols/Yahoo/src/search.cpp +++ b/protocols/Yahoo/src/search.cpp @@ -165,7 +165,7 @@ void __cdecl CYahooProto::searchadv_thread(void *pHWND) HWND hwndDlg = (HWND) pHWND;
TCHAR searchid[128];
- GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, 128);
+ GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, SIZEOF(searchid));
if (lstrlen(searchid) == 0) {
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 5fd99f9c6e..f2b179c870 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -147,7 +147,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam CYahooProto* ppro = ( CYahooProto* )GetWindowLongPtr(hwndDlg, GWLP_USERDATA );
/* Get String from dialog */
- GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, sizeof( str ));
+ GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, SIZEOF(str));
/* Save it for later use */
ppro->setString( YAHOO_CUSTSTATDB, str );
@@ -174,7 +174,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam BOOL toSet;
- toSet = GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, sizeof( str )) != 0;
+ toSet = GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, SIZEOF(str)) != 0;
EnableWindow( GetDlgItem(hwndDlg, IDOK ), toSet );
}
|