From b327ed7872ca83c3a4249039ba1a3d8dd3ece630 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 17 Jan 2017 17:19:19 +0300 Subject: useless field DBEVENTINFO::cbSize removed --- protocols/FacebookRM/src/process.cpp | 11 +++-------- protocols/FacebookRM/src/proto.cpp | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'protocols/FacebookRM/src') diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index e9aded49e9..7551c71077 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -444,9 +444,7 @@ void FacebookProto::LoadHistory(void *pParam) lastMessageId = msg.message_id; // We don't use ProtoChainRecvMsg here as this is just loading of old messages, which we just add to log - DBEVENTINFO dbei = { 0 }; - dbei.cbSize = sizeof(dbei); - + DBEVENTINFO dbei = {}; if (msg.type == MESSAGE) dbei.eventType = EVENTTYPE_MESSAGE; else if (msg.type == VIDEO_CALL || msg.type == PHONE_CALL) @@ -917,9 +915,7 @@ void FacebookProto::ReceiveMessages(std::vector &messages, boo ProtoChainRecvMsg(hContact, &recv); } else { - DBEVENTINFO dbei = { 0 }; - dbei.cbSize = sizeof(dbei); - + DBEVENTINFO dbei = {}; if (msg.type == MESSAGE) dbei.eventType = EVENTTYPE_MESSAGE; else if (msg.type == VIDEO_CALL || msg.type == PHONE_CALL) @@ -1101,8 +1097,7 @@ void FacebookProto::ProcessFriendRequests(void*) DB_AUTH_BLOB blob(hContact, fbu.real_name.c_str(), 0, 0, fbu.user_id.c_str(), reason.c_str()); - DBEVENTINFO dbei = { 0 }; - dbei.cbSize = sizeof(DBEVENTINFO); + DBEVENTINFO dbei = {}; dbei.szModule = m_szModuleName; dbei.timestamp = ::time(NULL); dbei.flags = DBEF_UTF; diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 73ff55b9c0..0cb9fc7a37 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -904,7 +904,7 @@ INT_PTR FacebookProto::OnCancelFriendshipRequest(WPARAM wParam, LPARAM) MCONTACT FacebookProto::HContactFromAuthEvent(MEVENT hEvent) { DWORD body[2]; - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; dbei.cbBlob = sizeof(DWORD) * 2; dbei.pBlob = (PBYTE)&body; -- cgit v1.2.3