diff options
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 9 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_feed.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_history.cpp | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 1b01726814..fb518e1420 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -556,7 +556,7 @@ void CVkProto::DBAddAuthRequest(const MCONTACT hContact, bool added) T2Utf(ptrW(db_get_wsa(hContact, m_szModuleName, "FirstName"))),
T2Utf(ptrW(db_get_wsa(hContact, m_szModuleName, "LastName"))), NULL, NULL);
- DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
+ DBEVENTINFO dbei = {};
dbei.szModule = m_szModuleName;
dbei.timestamp = (DWORD)time(NULL);
dbei.flags = DBEF_UTF;
@@ -574,7 +574,7 @@ MCONTACT CVkProto::MContactFromDbEvent(MEVENT hDbEvent) return INVALID_CONTACT_ID;
DWORD body[2];
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD) * 2;
dbei.pBlob = (PBYTE)&body;
@@ -713,7 +713,7 @@ void CVkProto::MarkDialogAsRead(MCONTACT hContact) MCONTACT hMContact = db_mc_tryMeta(hContact);
while ((hDBEvent = db_event_firstUnread(hContact)) != NULL)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule))
{
db_event_markRead(hContact, hDBEvent);
@@ -1451,8 +1451,7 @@ void CVkProto::AddVkDeactivateEvent(MCONTACT hContact, CMStringW& wszType) if (iDEIdx == -1)
return;
- DBEVENTINFO dbei;
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
dbei.szModule = m_szModuleName;
dbei.timestamp = time(NULL);
dbei.eventType = VK_USER_DEACTIVATE_ACTION;
diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index ac23773168..44dc556477 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -867,7 +867,7 @@ void CVkProto::NewsClearHistory() MEVENT hDBEvent = db_event_first(hContact);
while (hDBEvent) {
MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDBEvent, &dbei);
if (dbei.timestamp < tTime)
db_event_delete(hContact, hDBEvent);
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp index b4e392d2b7..4f4bfb15fc 100644 --- a/protocols/VKontakte/src/vk_history.cpp +++ b/protocols/VKontakte/src/vk_history.cpp @@ -94,7 +94,7 @@ void CVkProto::GetServerHistoryLastNDay(MCONTACT hContact, int NDay) MEVENT hDBEvent = db_event_first(hContact);
while (hDBEvent) {
MEVENT hDBEventNext = db_event_next(hContact, hDBEvent);
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDBEvent, &dbei);
if (dbei.timestamp > tTime && dbei.eventType != VK_USER_DEACTIVATE_ACTION)
db_event_delete(hContact, hDBEvent);
|