From f9883d97b3a586663f85075206fe7e07b41ed366 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 3 Apr 2018 16:56:45 +0300 Subject: unneeded size fields removed --- src/core/stdaway/src/awaymsg.cpp | 1 - src/core/stdfile/src/file.cpp | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 892556f77b..87a68ffb0c 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -73,7 +73,6 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP if (dat->hSeq == nullptr) { ACKDATA ack = { 0 }; - ack.cbSize = sizeof(ack); ack.hContact = dat->hContact; ack.type = ACKTYPE_AWAYMSG; ack.result = ACKRESULT_SUCCESS; diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 87fcaf65d1..9982d6274c 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -304,13 +304,12 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM) static int SRFileProtoAck(WPARAM, LPARAM lParam) { ACKDATA *ack = (ACKDATA*)lParam; - if (ack->type != ACKTYPE_FILE) return 0; - - int iEvent = 0; - while (CLISTEVENT *cle = pcli->pfnGetEvent(ack->hContact, iEvent++)) - if (cle->lParam == (LPARAM)ack->hProcess) - pcli->pfnRemoveEvent(ack->hContact, cle->hDbEvent); - + if (ack->type == ACKTYPE_FILE) { + int iEvent = 0; + while (CLISTEVENT *cle = pcli->pfnGetEvent(ack->hContact, iEvent++)) + if (cle->lParam == (LPARAM)ack->hProcess) + pcli->pfnRemoveEvent(ack->hContact, cle->hDbEvent); + } return 0; } -- cgit v1.2.3