diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
commit | b327ed7872ca83c3a4249039ba1a3d8dd3ece630 (patch) | |
tree | 5a4ae83dafab23f7832186b5dd0736611998f43c /protocols/MSN/src | |
parent | fd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff) |
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'protocols/MSN/src')
-rw-r--r-- | protocols/MSN/src/msn_commands.cpp | 8 | ||||
-rw-r--r-- | protocols/MSN/src/msn_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/MSN/src/msn_proto.cpp | 8 |
3 files changed, 8 insertions, 10 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 58391b4b29..3d61b36603 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -346,8 +346,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para else {
bool haveWnd = MSN_MsgWndExist(hContact);
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF | (haveWnd ? 0 : DBEF_READ) | (isRtl ? DBEF_RTL : 0);
dbei.szModule = m_szModuleName;
@@ -1103,7 +1102,7 @@ LBL_InvalidCommand: if (hContact) {
// There are messages to be fetched
if (hDbEvent = db_event_last(hContact)) {
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
ts = dbei.timestamp;
}
@@ -1172,7 +1171,7 @@ LBL_InvalidCommand: /* Protect against double sync (Miranda MSGs only have granularity in seconds) */
MEVENT hDbEvent;
bool bDuplicate = false;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
DWORD cbBlob = (DWORD)mir_strlen(message);
dbei.cbBlob = cbBlob;
BYTE *pszMsgBuf = (BYTE*)mir_calloc(cbBlob);
@@ -1198,7 +1197,6 @@ LBL_InvalidCommand: }
else {
memset(&dbei, 0, sizeof(dbei));
- dbei.cbSize = sizeof(dbei);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.flags = DBEF_SENT | DBEF_UTF;
dbei.szModule = m_szModuleName;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index d4e873b20f..b9fd6955cd 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -851,7 +851,7 @@ void CMsnProto::MSN_FetchRecentMessages(time_t since) if (!(hDbEvent = db_event_last(hContact)))
continue;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
db_event_get(hDbEvent, &dbei);
if (dbei.timestamp>since) since=dbei.timestamp;
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 208320aa45..bde9e9c7f2 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -267,7 +267,7 @@ MCONTACT __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr) MCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int, MEVENT hDbEvent)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
return NULL;
@@ -315,7 +315,7 @@ int CMsnProto::Authorize(MEVENT hDbEvent) if (!msnLoggedIn)
return 1;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1)
return 1;
@@ -348,7 +348,7 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) if (!msnLoggedIn)
return 1;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1)
return 1;
@@ -811,7 +811,7 @@ int CMsnProto::GetInfo(MCONTACT hContact, int) int CMsnProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
PROTOSEARCHRESULT **isrList = (PROTOSEARCHRESULT**)pre->szMessage;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
BYTE *pCurBlob;
int i;
|