summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_iqid_muc.cpp14
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp12
-rw-r--r--protocols/Sametime/src/conference.cpp2
-rw-r--r--protocols/Sametime/src/messaging.cpp2
-rw-r--r--protocols/Tlen/src/tlen_svc.cpp2
-rw-r--r--protocols/Yahoo/src/proto.cpp2
-rw-r--r--protocols/Yahoo/src/search.cpp8
8 files changed, 21 insertions, 23 deletions
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp
index 378c610910..37160b7ad7 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -551,7 +551,7 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM hContact, LPARAM lParam)
if (item == NULL || selected) {
CJabberAdhocStartupParams* pStartupParams = new CJabberAdhocStartupParams(this, jid, NULL);
- CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)(pStartupParams));
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FORM), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)pStartupParams);
}
}
else if (lParam != 0)
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp
index 8beb71694a..fde613418b 100644
--- a/protocols/JabberG/src/jabber_iqid_muc.cpp
+++ b/protocols/JabberG/src/jabber_iqid_muc.cpp
@@ -89,11 +89,9 @@ static void sttFillJidList(HWND hwndDlg)
lvi.iSubItem = 0;
for (int i=0; i<count; i++) {
lvi.iItem = i;
- if (ListView_GetItem(hwndList, &lvi) == TRUE) {
- if (lvi.lParam!=(LPARAM)(-1) && lvi.lParam!=(LPARAM)(NULL)) {
+ if (ListView_GetItem(hwndList, &lvi) == TRUE)
+ if (lvi.lParam != -1 && lvi.lParam != NULL)
mir_free((void *) lvi.lParam);
- }
- }
}
ListView_DeleteAllItems(hwndList);
@@ -145,7 +143,7 @@ static void sttFillJidList(HWND hwndDlg)
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(hwndList, &lvi);
SendMessage(hwndList, WM_SETREDRAW, TRUE, 0);
@@ -297,7 +295,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w
ListView_GetSubItemRect(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc);
if (nm->iSubItem == 1) {
HICON hIcon;
- if (nm->nmcd.lItemlParam == (LPARAM)(-1))
+ if (nm->nmcd.lItemlParam == -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
else
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
@@ -335,7 +333,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w
lvi.pszText = text;
lvi.cchTextMax = SIZEOF(text);
ListView_GetItem(nm->hdr.hwndFrom, &lvi);
- if (lvi.lParam == (LPARAM)(-1)) {
+ if (lvi.lParam == -1) {
CMString szBuffer(dat->type2str());
if (!dat->ppro->EnterString(szBuffer, NULL, ESF_COMBO, "gcAddNick_"))
break;
@@ -397,7 +395,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w
for (int i=0; i<count; i++) {
lvi.iItem = i;
if (ListView_GetItem(hwndList, &lvi) == TRUE) {
- if (lvi.lParam!=(LPARAM)(-1) && lvi.lParam!=(LPARAM)(NULL)) {
+ if (lvi.lParam != -1 && lvi.lParam != NULL) {
mir_free((void *) lvi.lParam);
}
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 9952d6e826..8350193384 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -743,7 +743,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_EMAILS), &lvi);
//phones
@@ -764,7 +764,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
lvi.iItem++;
}
lvi.mask = LVIF_PARAM;
- lvi.lParam = (LPARAM)(-1);
+ lvi.lParam = -1;
ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi);
}
break;
@@ -804,11 +804,11 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
HICON hIcon;
ListView_GetSubItemRect(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc);
- if (nm->nmcd.lItemlParam == (LPARAM)(-1) && nm->iSubItem == 3)
+ if (nm->nmcd.lItemlParam == -1 && nm->iSubItem == 3)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
- else if (nm->iSubItem == 2 && nm->nmcd.lItemlParam != (LPARAM)(-1))
+ else if (nm->iSubItem == 2 && nm->nmcd.lItemlParam != -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_EDIT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
- else if (nm->iSubItem == 3 && nm->nmcd.lItemlParam != (LPARAM)(-1))
+ else if (nm->iSubItem == 3 && nm->nmcd.lItemlParam != -1)
hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
else break;
DrawIconEx(nm->nmcd.hdc, (rc.left + rc.right - GetSystemMetrics(SM_CXSMICON)) / 2, (rc.top + rc.bottom - GetSystemMetrics(SM_CYSMICON)) / 2, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
@@ -839,7 +839,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
lvi.iItem = hti.iItem;
lvi.iSubItem = 0;
ListView_GetItem(nm->hdr.hwndFrom, &lvi);
- if (lvi.lParam == (LPARAM)(-1)) {
+ if (lvi.lParam == -1) {
if (hti.iSubItem == 3) {
//add
EditDlgParam param = { -1, ppro };
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index 4f3402413a..cadbea21a9 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -279,7 +279,7 @@ void mwServiceConf_on_text(mwConference* conf, mwLoginInfo* user, const char* wh
gce.ptszUID = tszUserId;
gce.time = (DWORD)time(0);
- CallService(MS_GC_EVENT, 0, (LPARAM)(GCEVENT *) &gce);
+ CallService(MS_GC_EVENT, 0, (LPARAM)&gce);
mir_free(textT);
mir_free(tszUserName);
diff --git a/protocols/Sametime/src/messaging.cpp b/protocols/Sametime/src/messaging.cpp
index ce457d3611..aafffea62e 100644
--- a/protocols/Sametime/src/messaging.cpp
+++ b/protocols/Sametime/src/messaging.cpp
@@ -74,7 +74,7 @@ void mwIm_conversation_recv(mwConversation* conv, mwImSendType type, gconstpoint
proto->debugLog(_T("mwIm_conversation_recv() type=[%d] hContact=[%x]"), type, hContact);
if (type == mwImSend_TYPING) {
- CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)(GPOINTER_TO_UINT(msg) == 0 ? 0 : 2));
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, (GPOINTER_TO_UINT(msg) == 0 ? 0 : 2));
return;
}
diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp
index 005f9af3ab..915fa2d7b5 100644
--- a/protocols/Tlen/src/tlen_svc.cpp
+++ b/protocols/Tlen/src/tlen_svc.cpp
@@ -569,7 +569,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr)
if (item != NULL) {
db_free(&dbv);
ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1,
- item->statusMessage==NULL ? (LPARAM)NULL : (LPARAM)(TCHAR*)_A2T(item->statusMessage));
+ item->statusMessage == NULL ? NULL : _A2T(item->statusMessage));
} else {
ptrA ownJid(db_get_sa(NULL, data->proto->m_szModuleName, "jid"));
if (!mir_strcmp(ownJid, dbv.pszVal)){
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index 7d935a3418..4fbc1389a8 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -519,7 +519,7 @@ void __cdecl CYahooProto::get_status_thread(void *param)
FREE(sm);
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)(TCHAR*)_A2T(fm));
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, _A2T(fm));
}
HANDLE __cdecl CYahooProto::GetAwayMsg(MCONTACT hContact)
diff --git a/protocols/Yahoo/src/search.cpp b/protocols/Yahoo/src/search.cpp
index 2d25f978e6..e914dacec4 100644
--- a/protocols/Yahoo/src/search.cpp
+++ b/protocols/Yahoo/src/search.cpp
@@ -132,10 +132,10 @@ static INT_PTR CALLBACK YahooSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARA
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Yahoo! Messenger");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Lotus Sametime");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"LCS");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)(LPCSTR)"Windows Live (MSN)");
+ SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Yahoo! Messenger");
+ SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Lotus Sametime");
+ SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"LCS");
+ SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Windows Live (MSN)");
// select the first one
SendDlgItemMessage(hwndDlg, IDC_SEARCH_PROTOCOL, CB_SETCURSEL, 0, 0);