summaryrefslogtreecommitdiff
path: root/src/mir_app
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 /src/mir_app
parentfd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff)
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/addcontact.cpp6
-rw-r--r--src/mir_app/src/db_events.cpp4
-rw-r--r--src/mir_app/src/protocols.cpp5
3 files changed, 7 insertions, 8 deletions
diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp
index 7d568f49e8..7fac8f56a3 100644
--- a/src/mir_app/src/addcontact.cpp
+++ b/src/mir_app/src/addcontact.cpp
@@ -68,7 +68,7 @@ public:
Window_SetSkinIcon_IcoLib(m_hwnd, SKINICON_OTHER_ADDCONTACT);
if (m_acs.handleType == HANDLE_EVENT) {
DWORD dwUin;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = sizeof(DWORD);
dbei.pBlob = (PBYTE)&dwUin;
db_event_get(m_acs.hDbEvent, &dbei);
@@ -85,7 +85,7 @@ public:
hContact = 0;
if (m_acs.handleType == HANDLE_EVENT) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.cbBlob = db_event_getBlobSize(m_acs.hDbEvent);
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
db_event_get(m_acs.hDbEvent, &dbei);
@@ -178,7 +178,7 @@ public:
switch (m_acs.handleType) {
case HANDLE_EVENT:
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(m_acs.hDbEvent, &dbei);
hContact = (MCONTACT)CallProtoServiceInt(NULL, dbei.szModule, PS_ADDTOLISTBYEVENT, 0, (LPARAM)m_acs.hDbEvent);
}
diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp
index df027c4616..24dbeb55a8 100644
--- a/src/mir_app/src/db_events.cpp
+++ b/src/mir_app/src/db_events.cpp
@@ -102,7 +102,7 @@ static wchar_t* getEventString(DBEVENTINFO *dbei, LPSTR &buf)
static INT_PTR DbEventGetTextWorker(DBEVENTINFO *dbei, int codepage, int datatype)
{
- if (dbei == NULL || dbei->szModule == NULL || dbei->cbSize != sizeof(DBEVENTINFO))
+ if (dbei == NULL || dbei->szModule == NULL)
return 0;
DBEVENTTYPEDESCR *et = DbEvent_GetType(dbei->szModule, dbei->eventType);
@@ -308,7 +308,7 @@ PBYTE DB_AUTH_BLOB::makeBlob()
(m_szFirstName) ? m_szFirstName : "", 0,
(m_szLastName) ? m_szLastName : "", 0,
(m_szEmail) ? m_szEmail : "", 0,
- (m_szReason) ? m_szReason : 0);
+ (m_szReason) ? m_szReason : "", 0);
return pBlob;
}
diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp
index beb1d25389..b71d63bc99 100644
--- a/src/mir_app/src/protocols.cpp
+++ b/src/mir_app/src/protocols.cpp
@@ -158,8 +158,7 @@ static INT_PTR Proto_RecvMessage(WPARAM, LPARAM lParam)
ptrA pszTemp;
mir_ptr<BYTE> pszBlob;
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
dbei.flags = DBEF_UTF;
dbei.szModule = GetContactProto(ccs->hContact);
dbei.timestamp = pre->timestamp;
@@ -187,7 +186,7 @@ static INT_PTR Proto_AuthRecv(WPARAM wParam, LPARAM lParam)
{
PROTORECVEVENT* pre = (PROTORECVEVENT*)lParam;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dbei.szModule = (char*)wParam;
dbei.timestamp = pre->timestamp;
dbei.flags = DBEF_UTF | pre->flags & (PREF_CREATEREAD ? DBEF_READ : 0);