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/Tlen/src/tlen_misc.cpp | 2 +- protocols/Tlen/src/tlen_svc.cpp | 6 +++--- protocols/Tlen/src/tlen_thread.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/Tlen') diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp index edf15ab1c6..ae38e33bee 100644 --- a/protocols/Tlen/src/tlen_misc.cpp +++ b/protocols/Tlen/src/tlen_misc.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void TlenDBAddEvent(TlenProtocol *proto, MCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob) { - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; dbei.szModule = proto->m_szModuleName; dbei.timestamp = (DWORD) time(NULL); dbei.flags = flags; diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 2ec63b93f3..efced9bb74 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -225,7 +225,7 @@ MCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr) MCONTACT TlenProtocol::AddToListByEvent(int flags, int, MEVENT hDbEvent) { - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1)) return NULL; if ((dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob)) == NULL) @@ -262,7 +262,7 @@ int TlenProtocol::Authorize(MEVENT hDbEvent) if (!isOnline) return 1; - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)-1) return 1; if ((dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob)) == NULL) @@ -307,7 +307,7 @@ int TlenProtocol::AuthDeny(MEVENT hDbEvent, const wchar_t*) if (!isOnline) return 1; - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1)) return 1; if ((dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob)) == NULL) diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index d5cd06e298..2528b62f9e 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -701,7 +701,7 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) } else { MEVENT hDbEvent = db_event_last(hContact); if (hDbEvent != NULL) { - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; db_event_get( hDbEvent, &dbei); if (msgTime < dbei.timestamp) { msgTime = dbei.timestamp + 1; -- cgit v1.2.3