summaryrefslogtreecommitdiff
path: root/plugins/MirLua
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 /plugins/MirLua
parentfd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff)
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/src/m_database.cpp3
-rw-r--r--plugins/MirLua/src/m_message.cpp3
2 files changed, 1 insertions, 5 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index 7a916f63d2..79a07c898a 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -275,8 +275,6 @@ static int db_UnreadEvents(lua_State *L)
void MakeDbEvent(lua_State *L, DBEVENTINFO &dbei)
{
- dbei.cbSize = sizeof(dbei);
-
lua_getfield(L, -1, "Module");
dbei.szModule = mir_strdup(lua_tostring(L, -1));
lua_pop(L, 1);
@@ -694,7 +692,6 @@ void MT<DBEVENTINFO>::Init(lua_State *L, DBEVENTINFO **dbei)
MEVENT hDbEvent = luaL_checkinteger(L, 1);
*dbei = (DBEVENTINFO*)mir_calloc(sizeof(DBEVENTINFO));
- (*dbei)->cbSize = sizeof(DBEVENTINFO);
(*dbei)->cbBlob = db_event_getBlobSize((MEVENT)hDbEvent);
(*dbei)->pBlob = (PBYTE)mir_calloc((*dbei)->cbBlob);
db_event_get((MEVENT)hDbEvent, (*dbei));
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp
index cf13c1ff35..05a064eedf 100644
--- a/plugins/MirLua/src/m_message.cpp
+++ b/plugins/MirLua/src/m_message.cpp
@@ -41,8 +41,7 @@ static int message_Send(lua_State *L)
}
else if ((res = ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)message)) != ACKRESULT_FAILED)
{
- DBEVENTINFO dbei;
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
dbei.szModule = MODULE;
dbei.timestamp = time(NULL);
dbei.eventType = EVENTTYPE_MESSAGE;