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 --- plugins/Import/src/import.cpp | 2 +- plugins/Import/src/utils.cpp | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'plugins/Import') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 701f9fa8b2..1d61ae374d 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -855,7 +855,7 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC MEVENT hEvent = srcDb->FindFirstEvent(hContact); for (int i = 0; hEvent; i++, hEvent = srcDb->FindNextEvent(hContact, hEvent)) { // Copy the event and import it - DBEVENTINFO dbei = { sizeof(DBEVENTINFO) }; + DBEVENTINFO dbei = {}; dbei.cbBlob = srcDb->GetBlobSize(hEvent); if (dbei.cbBlob > cbAlloc) { cbAlloc = dbei.cbBlob + 4096 - dbei.cbBlob % 4096; diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index c39c05640b..7a77bc8a05 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -68,7 +68,7 @@ bool IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) if (hExistingDbEvent == NULL) return FALSE; - DBEVENTINFO dbeiExisting = { sizeof(dbeiExisting) }; + DBEVENTINFO dbeiExisting = {}; db_event_get(hExistingDbEvent, &dbeiExisting); DWORD dwEventTimeStamp = dbeiExisting.timestamp; @@ -91,7 +91,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; @@ -108,7 +107,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 (IsEqualEvent(dbei, dbeiExisting)) @@ -118,7 +116,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) { @@ -139,7 +136,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) { @@ -165,7 +161,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) { -- cgit v1.2.3