summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/cmdlist.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp8
-rw-r--r--src/core/stdmsg/src/msglog.cpp2
-rw-r--r--src/core/stdmsg/src/msgs.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp
index e2b1e7544c..d334eb19ef 100644
--- a/src/core/stdmsg/src/cmdlist.cpp
+++ b/src/core/stdmsg/src/cmdlist.cpp
@@ -92,7 +92,7 @@ void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char *sz
return;
}
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (p->flags & PREF_RTL ? DBEF_RTL : 0);
dbei.szModule = GetContactProto(hContact);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 4393ef0d74..75e388a03f 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -506,7 +506,7 @@ void CSrmmWindow::OnInitDialog()
if (hPrevEvent == NULL)
break;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
m_hDbEventFirst = hPrevEvent;
db_event_get(hPrevEvent, &dbei);
if (!DbEventIsShown(&dbei))
@@ -515,7 +515,7 @@ void CSrmmWindow::OnInitDialog()
break;
case LOADHISTORY_TIME:
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if (m_hDbEventFirst == NULL)
dbei.timestamp = (DWORD)time(NULL);
else
@@ -544,7 +544,7 @@ void CSrmmWindow::OnInitDialog()
MEVENT hdbEvent = db_event_last(m_hContact);
if (hdbEvent) {
do {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hdbEvent, &dbei);
if ((dbei.eventType == EVENTTYPE_MESSAGE) && !(dbei.flags & DBEF_SENT)) {
m_lastMessage = dbei.timestamp;
@@ -1178,7 +1178,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (m_hDbEventFirst == NULL)
m_hDbEventFirst = hDbEvent;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
bool isMessage = (dbei.eventType == EVENTTYPE_MESSAGE), isSent = ((dbei.flags & DBEF_SENT) != 0);
if (DbEventIsShown(&dbei)) {
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index a49be9f4cb..b4eb69150f 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -201,7 +201,7 @@ int DbEventIsShown(DBEVENTINFO *dbei)
//mir_free() the return value
static bool CreateRTFFromDbEvent(LogStreamData *dat)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = db_event_getBlobSize(dat->hDbEvent);
if (dbei.cbBlob == -1)
return false;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 9073c0970f..4bc28191a7 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -54,7 +54,7 @@ static int SRMMStatusToPf2(int status)
static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(lParam, &dbei);
if (dbei.flags & (DBEF_SENT | DBEF_READ) || !(dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)))
@@ -237,7 +237,7 @@ static void RestoreUnreadMessageAlerts(void)
for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
bool autoPopup = false;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = 0;
db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & (DBEF_SENT | DBEF_READ)) && (dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {