diff options
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_db.cpp | 7 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 2 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.cpp | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index f1c79fb526..d1781a386a 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -54,7 +54,7 @@ void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus) MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent)
{
DWORD body[3];
- DBEVENTINFO dbei = { sizeof(DBEVENTINFO) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD) * 2;
dbei.pBlob = (PBYTE)&body;
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index 6cfd2a8e70..2dbe2ced90 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -41,7 +41,7 @@ MEVENT CSkypeProto::GetMessageFromDb(MCONTACT hContact, const char *messageId, L mir_cslock lock(messageSyncLock); for (MEVENT hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) { - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; dbei.cbBlob = db_event_getBlobSize(hDbEvent); if (dbei.cbBlob < messageIdLength) @@ -79,7 +79,7 @@ MEVENT CSkypeProto::AddDbEvent(WORD type, MCONTACT hContact, DWORD timestamp, DW MEVENT CSkypeProto::AppendDBEvent(MCONTACT hContact, MEVENT hEvent, const char *szContent, const char *szUid, time_t edit_time) { mir_cslock lck(m_AppendMessageLock); - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; dbei.cbBlob = db_event_getBlobSize(hEvent); mir_ptr<BYTE> blob((PBYTE)mir_alloc(dbei.cbBlob)); dbei.pBlob = blob; @@ -134,8 +134,7 @@ MEVENT CSkypeProto::AppendDBEvent(MCONTACT hContact, MEVENT hEvent, const char * MEVENT CSkypeProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob) { - DBEVENTINFO dbei; - dbei.cbSize = sizeof(dbei); + DBEVENTINFO dbei = {}; dbei.szModule = m_szModuleName; dbei.timestamp = timestamp; dbei.eventType = type; diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 380d6129ed..6530b6ceb6 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -264,7 +264,7 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent) {
debugLogA(__FUNCTION__);
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
time_t timestamp = dbei.timestamp;
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 275d8b0e2a..dd4f476562 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -161,7 +161,7 @@ MCONTACT CSkypeProto::AddToList(int, PROTOSEARCHRESULT *psr) MCONTACT CSkypeProto::AddToListByEvent(int, int, MEVENT hDbEvent) { debugLogA(__FUNCTION__); - DBEVENTINFO dbei = { sizeof(dbei) }; + DBEVENTINFO dbei = {}; if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1)) return NULL; if ((dbei.pBlob = (PBYTE)alloca(dbei.cbBlob)) == NULL) |