diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 16:56:45 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 16:56:45 +0300 |
commit | f9883d97b3a586663f85075206fe7e07b41ed366 (patch) | |
tree | 1aa3f212a908eda296de192129df8e49cc10cb13 /plugins | |
parent | 9613f96e6a6f96ad02a0fc926054132811ae2bb1 (diff) |
unneeded size fields removed
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/BuddyPounce/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/CloudFile/src/file_transfer.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/hotkeyhandler.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_refreshci.cpp | 16 |
5 files changed, 7 insertions, 16 deletions
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 7b9a7d2087..7cb321e292 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -57,7 +57,7 @@ int MsgAck(WPARAM, LPARAM lParam) {
ACKDATA *ack=(ACKDATA*)lParam;
- if (ack && ack->cbSize == sizeof(ACKDATA) && ack->type == ACKTYPE_MESSAGE) {
+ if (ack && ack->type == ACKTYPE_MESSAGE) {
if (ack->hProcess == (HANDLE)WindowList_Find(hWindowList,ack->hContact)) {
if (db_get_b(NULL, modname, "ShowDeliveryMessages", 1))
CreateMessageAcknowlegedWindow(ack->hContact,ack->result == ACKRESULT_SUCCESS);
diff --git a/plugins/CloudFile/src/file_transfer.h b/plugins/CloudFile/src/file_transfer.h index d568e60327..a19c62a412 100644 --- a/plugins/CloudFile/src/file_transfer.h +++ b/plugins/CloudFile/src/file_transfer.h @@ -32,7 +32,6 @@ public: folderName = NULL; relativePathStart = 0; - pfts.cbSize = sizeof(this->pfts); pfts.flags = PFTS_UNICODE | PFTS_SENDING; pfts.hContact = hContact; pfts.currentFileNumber = -1; diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index b53ec868d1..69300b36ad 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -465,7 +465,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
SendJob *job = sendQueue->getJobByIndex((int)wParam);
- ACKDATA ack = { 0 };
+ ACKDATA ack = {};
ack.hContact = job->hContact;
ack.hProcess = (HANDLE)job->iSendId;
ack.type = ACKTYPE_MESSAGE;
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index baf21a59d5..850ddee811 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -282,7 +282,7 @@ int SendQueue::sendQueued(CTabBaseDlg *dat, const int iEntry) m_jobs[iEntry].iSendId = ProtoChainSend(dat->m_hContact, PSS_MESSAGE, m_jobs[iEntry].dwFlags, (LPARAM)m_jobs[iEntry].szSendBuffer); if (dat->m_sendMode & SMODE_NOACK) { // fake the ack if we are not interested in receiving real acks - ACKDATA ack = { 0 }; + ACKDATA ack = {}; ack.hContact = dat->m_hContact; ack.hProcess = (HANDLE)m_jobs[iEntry].iSendId; ack.type = ACKTYPE_MESSAGE; diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 59b991cfb9..f340a300c3 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -541,27 +541,19 @@ class CContactUpdater : public CContactQueue **/
int __cdecl OnProtoAck(WPARAM, ACKDATA *ack)
{
- if (ack && ack->cbSize == sizeof(ACKDATA) && ack->hContact == _hContact && ack->type == ACKTYPE_GETINFO)
- {
- if (ack->hProcess || ack->lParam)
- {
- if (!_hContactAcks)
- {
+ if (ack && ack->hContact == _hContact && ack->type == ACKTYPE_GETINFO) {
+ if (ack->hProcess || ack->lParam) {
+ if (!_hContactAcks) {
_nContactAcks = (INT_PTR)ack->hProcess;
_hContactAcks = (PBYTE)mir_calloc(sizeof(BYTE) * (INT_PTR)ack->hProcess);
}
+
if (ack->result == ACKRESULT_SUCCESS || ack->result == ACKRESULT_FAILED)
- {
_hContactAcks[ack->lParam] = 1;
- }
for (int i = 0; i < _nContactAcks; i++)
- {
if (_hContactAcks[i] == 0)
- {
return 0;
- }
- }
}
// don't wait the full time, but continue immitiatly
ContinueWithNext();
|