diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-11-28 21:19:14 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-11-28 21:19:14 +0000 |
commit | 6895d635acb37ba42e53ba95ca3eee2ddbbef24d (patch) | |
tree | f85a1d97784c4597099864119acb027b9a3f2dba /protocols/Sametime | |
parent | 8ef06acf351fdb6034b6e13670d84bfd79161956 (diff) |
Massive code cleanup and fixes for a lot of warnings reported in #837
git-svn-id: http://svn.miranda-ng.org/main/trunk@11136 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime')
-rw-r--r-- | protocols/Sametime/src/files.cpp | 6 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp index cfbc52d824..29f3a0a077 100644 --- a/protocols/Sametime/src/files.cpp +++ b/protocols/Sametime/src/files.cpp @@ -358,7 +358,7 @@ HANDLE CSametimeProto::SendFilesToUser(MCONTACT hContact, PROTOCHAR** files, con HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* save_path)
{
- mwFileTransfer* ft = (mwFileTransfer*)(hFt);
+ mwFileTransfer* ft = (mwFileTransfer*)hFt;
CSametimeProto* proto = getProtoFromMwFileTransfer(ft);
debugLog(_T("CSametimeProto::AcceptFileTransfer() start"));
@@ -366,7 +366,7 @@ HANDLE CSametimeProto::AcceptFileTransfer(MCONTACT hContact, HANDLE hFt, char* s memset((void*)ftcd, 0, sizeof(FileTransferClientData));
ftcd->ft = ft;
ftcd->sending = false;
- ftcd->hFt = (HANDLE)ft;
+ ftcd->hFt = hFt;
if (save_path) // save path
ftcd->save_path = _strdup(save_path);
@@ -420,7 +420,7 @@ void CSametimeProto::CancelFileTransfer(HANDLE hFt) FileTransferClientData* ftcd = (FileTransferClientData*)mwFileTransfer_getClientData(ft);
if (ftcd) {
- while (mwFileTransfer_isDone(ftcd->ft) && ftcd)
+ while (ftcd && mwFileTransfer_isDone(ftcd->ft))
ftcd = ftcd->next;
if (ftcd) mwFileTransfer_cancel(ftcd->ft);
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index b0b50a6e52..f8966db031 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -174,12 +174,12 @@ void __cdecl sttRecvAwayThread(void *param) int CSametimeProto::OnWindowEvent(WPARAM, LPARAM lParam)
{
- MessageWindowEventData* mwed = (MessageWindowEventData*)lParam;
+ MessageWindowEventData *mwed = (MessageWindowEventData*)lParam;
- if (db_get_b(mwed->hContact, m_szModuleName, "ChatRoom", 0))
+ if ((mwed == NULL) || db_get_b(mwed->hContact, m_szModuleName, "ChatRoom", 0))
return 0;
- if (mwed && (mwed->uType == MSG_WINDOW_EVT_CLOSING || mwed->uType == MSG_WINDOW_EVT_CLOSE))
+ if ((mwed->uType == MSG_WINDOW_EVT_CLOSING) || (mwed->uType == MSG_WINDOW_EVT_CLOSE))
CloseIm(mwed->hContact);
return 0;
|