summaryrefslogtreecommitdiff
path: root/plugins/Import/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-17 17:19:19 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-17 17:19:19 +0300
commitb327ed7872ca83c3a4249039ba1a3d8dd3ece630 (patch)
tree5a4ae83dafab23f7832186b5dd0736611998f43c /plugins/Import/src
parentfd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff)
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/Import/src')
-rw-r--r--plugins/Import/src/import.cpp2
-rw-r--r--plugins/Import/src/utils.cpp7
2 files changed, 2 insertions, 7 deletions
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) {