summaryrefslogtreecommitdiff
path: root/plugins/Variables/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/Variables/src
parentfd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff)
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/parse_miranda.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index da9874adad..0c3c2af113 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -415,14 +415,9 @@ static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags)
static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
{
- DBEVENTINFO dbe;
BOOL bEventOk;
do {
- memset(&dbe, 0, sizeof(DBEVENTINFO));
- dbe.cbSize = sizeof(DBEVENTINFO);
- dbe.cbBlob = 0;
- dbe.pBlob = NULL;
if (hContact != NULL) {
if ((flags & DBE_FIRST) && (flags & DBE_UNREAD)) {
hDbEvent = db_event_firstUnread(hContact);
@@ -442,6 +437,7 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
MEVENT hMatchEvent = NULL, hSearchEvent = NULL;
DWORD matchTimestamp = 0, priorTimestamp = 0;
+ DBEVENTINFO dbe = {};
if (flags & DBE_FIRST) {
for (MCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
@@ -502,7 +498,8 @@ static MEVENT findDbEvent(MCONTACT hContact, MEVENT hDbEvent, int flags)
}
}
}
- dbe.cbBlob = 0;
+
+ DBEVENTINFO dbe = {};
if (db_event_get(hDbEvent, &dbe))
bEventOk = FALSE;
else
@@ -569,7 +566,7 @@ static wchar_t* parseDbEvent(ARGUMENTSINFO *ai)
if (hDbEvent == NULL)
return NULL;
- DBEVENTINFO dbe = { sizeof(dbe) };
+ DBEVENTINFO dbe = {};
dbe.cbBlob = db_event_getBlobSize(hDbEvent);
dbe.pBlob = (PBYTE)mir_calloc(dbe.cbBlob);
if (db_event_get(hDbEvent, &dbe)) {