From 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 Mon Sep 17 00:00:00 2001
From: Rozhuk Ivan <rozhuk.im@gmail.com>
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/IcqOscarJ/src/UI/loginpassword.cpp | 2 +-
 protocols/IcqOscarJ/src/changeinfo/db.cpp    | 4 ++--
 protocols/IcqOscarJ/src/icq_advsearch.cpp    | 4 ++--
 protocols/IcqOscarJ/src/icq_firstrun.cpp     | 4 ++--
 protocols/IcqOscarJ/src/icq_opts.cpp         | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

(limited to 'protocols/IcqOscarJ')

diff --git a/protocols/IcqOscarJ/src/UI/loginpassword.cpp b/protocols/IcqOscarJ/src/UI/loginpassword.cpp
index da8fe181bf..3464db871a 100644
--- a/protocols/IcqOscarJ/src/UI/loginpassword.cpp
+++ b/protocols/IcqOscarJ/src/UI/loginpassword.cpp
@@ -66,7 +66,7 @@ INT_PTR CALLBACK LoginPasswdDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
 			ppro->m_bRememberPwd = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SAVEPASS);
 			ppro->setByte("RememberPass", ppro->m_bRememberPwd);
 
-			GetDlgItemTextA(hwndDlg, IDC_LOGINPW, ppro->m_szPassword, sizeof(ppro->m_szPassword));
+			GetDlgItemTextA(hwndDlg, IDC_LOGINPW, ppro->m_szPassword, SIZEOF(ppro->m_szPassword));
 
 			ppro->icq_login(ppro->m_szPassword);
 
diff --git a/protocols/IcqOscarJ/src/changeinfo/db.cpp b/protocols/IcqOscarJ/src/changeinfo/db.cpp
index d4d8d6881c..963ed4eb4c 100644
--- a/protocols/IcqOscarJ/src/changeinfo/db.cpp
+++ b/protocols/IcqOscarJ/src/changeinfo/db.cpp
@@ -136,7 +136,7 @@ static INT_PTR CALLBACK PwConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
 			{
 				char szTest[16];
 
-				GetDlgItemTextA(hwndDlg, IDC_OLDPASS, szTest, sizeof(szTest));
+				GetDlgItemTextA(hwndDlg, IDC_OLDPASS, szTest, SIZEOF(szTest));
 
 				if (strcmpnull(szTest, dat->ppro->GetUserPassword(TRUE))) {
 					MessageBox(hwndDlg, TranslateT("The password does not match your current password. Check Caps Lock and try again."), TranslateT("Change ICQ Details"), MB_OK);
@@ -145,7 +145,7 @@ static INT_PTR CALLBACK PwConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
 					break;
 				}
 
-				GetDlgItemTextA(hwndDlg, IDC_PASSWORD, szTest, sizeof(szTest));
+				GetDlgItemTextA(hwndDlg, IDC_PASSWORD, szTest, SIZEOF(szTest));
 				if (strcmpnull(szTest, dat->Pass)) {
 					MessageBox(hwndDlg, TranslateT("The password does not match the password you originally entered. Check Caps Lock and try again."), TranslateT("Change ICQ Details"), MB_OK);
 					SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_SETSEL, 0, (LPARAM)-1);
diff --git a/protocols/IcqOscarJ/src/icq_advsearch.cpp b/protocols/IcqOscarJ/src/icq_advsearch.cpp
index 510c1bc03b..c50d7dcc8b 100644
--- a/protocols/IcqOscarJ/src/icq_advsearch.cpp
+++ b/protocols/IcqOscarJ/src/icq_advsearch.cpp
@@ -72,7 +72,7 @@ static void searchPackTLVLNTS(PBYTE *buf, size_t *buflen, HWND hwndDlg, UINT idC
 {
 	char str[512];
 
-	GetDlgItemTextA(hwndDlg, idControl, str, sizeof(str));
+	GetDlgItemTextA(hwndDlg, idControl, str, SIZEOF(str));
 
 	ppackLETLVLNTS(buf, buflen, str, wType, 0);
 }
@@ -81,7 +81,7 @@ static void searchPackTLVWordLNTS(PBYTE *buf, size_t *buflen, HWND hwndDlg, UINT
 {
 	char str[512];
 
-	GetDlgItemTextA(hwndDlg, idControl, str, sizeof(str));
+	GetDlgItemTextA(hwndDlg, idControl, str, SIZEOF(str));
 
 	ppackLETLVWordLNTS(buf, buflen, w, str, wType, 0);
 }
diff --git a/protocols/IcqOscarJ/src/icq_firstrun.cpp b/protocols/IcqOscarJ/src/icq_firstrun.cpp
index 5cd1ceece3..1880dd3364 100644
--- a/protocols/IcqOscarJ/src/icq_firstrun.cpp
+++ b/protocols/IcqOscarJ/src/icq_firstrun.cpp
@@ -86,10 +86,10 @@ INT_PTR CALLBACK icq_FirstRunDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
 		switch (((LPNMHDR)lParam)->code) {
 		case PSN_APPLY:
 			char str[128];
-			GetDlgItemTextA(hwndDlg, IDC_UIN, str, sizeof(str));
+			GetDlgItemTextA(hwndDlg, IDC_UIN, str, SIZEOF(str));
 			ppro->setDword(UNIQUEIDSETTING, atoi(str));
 
-			GetDlgItemTextA(hwndDlg, IDC_PW, str, sizeof(ppro->m_szPassword));
+			GetDlgItemTextA(hwndDlg, IDC_PW, str, SIZEOF(ppro->m_szPassword));
 			strcpy(ppro->m_szPassword, str);
 			ppro->setString("Password", str);
 			break;
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp
index d3466c6770..87c2a451cd 100644
--- a/protocols/IcqOscarJ/src/icq_opts.cpp
+++ b/protocols/IcqOscarJ/src/icq_opts.cpp
@@ -146,7 +146,7 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
 			char str[128];
 
 			ppro->setDword(UNIQUEIDSETTING, GetDlgItemInt(hwndDlg, IDC_ICQNUM, NULL, FALSE));
-			GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, sizeof(ppro->m_szPassword));
+			GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(ppro->m_szPassword));
 			if (mir_strlen(str)) {
 				strcpy(ppro->m_szPassword, str);
 				ppro->m_bRememberPwd = true;
@@ -154,7 +154,7 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
 			else ppro->m_bRememberPwd = ppro->getByte("RememberPass", 0);
 			ppro->setString("Password", str);
 
-			GetDlgItemTextA(hwndDlg, IDC_ICQSERVER, str, sizeof(str));
+			GetDlgItemTextA(hwndDlg, IDC_ICQSERVER, str, SIZEOF(str));
 			ppro->setString("OscarServer", str);
 
 			ppro->setWord("OscarPort", (WORD)GetDlgItemInt(hwndDlg, IDC_ICQPORT, NULL, FALSE));
-- 
cgit v1.2.3