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/JabberG/src/jabber_archive.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'protocols/JabberG/src/jabber_archive.cpp') diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index 32d5db407f..53165e64a1 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -94,7 +94,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) if (!hExistingDbEvent) return FALSE; - DBEVENTINFO dbeiExisting = { sizeof(dbeiExisting) }; + DBEVENTINFO dbeiExisting = {}; db_event_get(hExistingDbEvent, &dbeiExisting); DWORD dwEventTimeStamp = dbeiExisting.timestamp; @@ -117,7 +117,6 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) return FALSE; memset(&dbeiExisting, 0, sizeof(dbeiExisting)); - dbeiExisting.cbSize = sizeof(dbeiExisting); db_event_get(hExistingDbEvent, &dbeiExisting); dwEventTimeStamp = dbeiExisting.timestamp; @@ -135,7 +134,6 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) // check for equal timestamps if (dbei.timestamp == dwPreviousTimeStamp) { memset(&dbeiExisting, 0, sizeof(dbeiExisting)); - dbeiExisting.cbSize = sizeof(dbeiExisting); db_event_get(hPreviousDbEvent, &dbeiExisting); if (dbei == dbeiExisting) @@ -145,7 +143,6 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) hExistingDbEvent = db_event_next(hContact, hPreviousDbEvent); while (hExistingDbEvent != NULL) { memset(&dbeiExisting, 0, sizeof(dbeiExisting)); - dbeiExisting.cbSize = sizeof(dbeiExisting); db_event_get(hExistingDbEvent, &dbeiExisting); if (dbeiExisting.timestamp != dwPreviousTimeStamp) { @@ -166,7 +163,6 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) // look back while (hExistingDbEvent != NULL) { memset(&dbeiExisting, 0, sizeof(dbeiExisting)); - dbeiExisting.cbSize = sizeof(dbeiExisting); db_event_get(hExistingDbEvent, &dbeiExisting); if (dbei.timestamp > dbeiExisting.timestamp) { @@ -192,7 +188,6 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) // look forward while (hExistingDbEvent != NULL) { memset(&dbeiExisting, 0, sizeof(dbeiExisting)); - dbeiExisting.cbSize = sizeof(dbeiExisting); db_event_get(hExistingDbEvent, &dbeiExisting); if (dbei.timestamp < dbeiExisting.timestamp) { @@ -267,7 +262,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) T2Utf szEventText(tszBody); - DBEVENTINFO dbei = { sizeof(DBEVENTINFO) }; + DBEVENTINFO dbei = {}; dbei.eventType = EVENTTYPE_MESSAGE; dbei.szModule = m_szModuleName; dbei.cbBlob = (DWORD)mir_strlen(szEventText)+1; -- cgit v1.2.3