summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-03 16:56:45 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-03 16:56:45 +0300
commitf9883d97b3a586663f85075206fe7e07b41ed366 (patch)
tree1aa3f212a908eda296de192129df8e49cc10cb13 /src
parent9613f96e6a6f96ad02a0fc926054132811ae2bb1 (diff)
unneeded size fields removed
Diffstat (limited to 'src')
-rw-r--r--src/core/stdaway/src/awaymsg.cpp1
-rw-r--r--src/core/stdfile/src/file.cpp13
-rw-r--r--src/mir_app/src/proto_utils.cpp2
3 files changed, 7 insertions, 9 deletions
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;
}
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp
index 2211332254..787187f616 100644
--- a/src/mir_app/src/proto_utils.cpp
+++ b/src/mir_app/src/proto_utils.cpp
@@ -56,7 +56,7 @@ MIR_APP_DLL(void) Proto_EnumProtocols(int *nProtos, PROTOCOLDESCRIPTOR ***pProto
MIR_APP_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
- ACKDATA ack = { sizeof(ACKDATA), szModule, hContact, type, result, hProcess, lParam };
+ ACKDATA ack = { szModule, hContact, type, result, hProcess, lParam };
return NotifyEventHooks(hAckEvent, 0, (LPARAM)&ack);
}