summaryrefslogtreecommitdiff
path: root/protocols/MRA
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA')
-rw-r--r--protocols/MRA/src/MraProto.cpp9
-rw-r--r--protocols/MRA/src/Mra_proto.cpp4
2 files changed, 6 insertions, 7 deletions
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 20ac13f3b8..ede27df68b 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -160,8 +160,7 @@ MCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
MCONTACT CMraProto::AddToListByEvent(int, int, MEVENT hDbEvent)
{
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) != -1) {
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei) == 0 &&
@@ -181,7 +180,7 @@ int CMraProto::Authorize(MEVENT hDBEvent)
{
if (!m_bLoggedIn) return 1;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDBEvent)) == -1)
return 1;
@@ -199,7 +198,7 @@ int CMraProto::AuthDeny(MEVENT hDBEvent, const wchar_t* szReason)
{
if (!m_bLoggedIn) return 1;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDBEvent)) == -1)
return 1;
@@ -323,7 +322,7 @@ HANDLE CMraProto::SearchByName(const wchar_t *pszNick, const wchar_t *pszFirstNa
int CMraProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.szModule = m_szModuleName;
dbei.timestamp = pre->timestamp;
dbei.flags = (pre->flags & PREF_CREATEREAD) ? DBEF_READ : 0;
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 8ee2d7101f..99c2f70294 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -559,7 +559,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf)
if (IsEMailChatAgent(szEmail) == FALSE) {
CMStringA szBuff = CreateBlobFromContact(hContact, L"");
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.flags = DBEF_UTF;
dbei.szModule = m_szModuleName;
dbei.timestamp = (DWORD)_time32(NULL);
@@ -1746,7 +1746,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
CMStringA szBlob = CreateBlobFromContact(hContact, wszMessage);
if (bAutoGrantAuth) { // auto grant auth
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.szModule = m_szModuleName;
dbei.timestamp = _time32(NULL);
dbei.flags = DBEF_READ | DBEF_UTF;