summaryrefslogtreecommitdiff
path: root/plugins/SMS
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SMS')
-rw-r--r--plugins/SMS/src/SMS_svc.cpp6
-rw-r--r--plugins/SMS/src/receive.cpp7
-rw-r--r--plugins/SMS/src/senddlg.cpp1
3 files changed, 6 insertions, 8 deletions
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 31ccea8fdf..a88d44f33e 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -94,7 +94,7 @@ int ReadMsgSMS(WPARAM, LPARAM lParam)
{
CLISTEVENT *cle = (CLISTEVENT*)lParam;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(((CLISTEVENT*)lParam)->hDbEvent)) == -1)
return 1;
dbei.pBlob = (PBYTE)_alloca(dbei.cbBlob);
@@ -115,7 +115,7 @@ int ReadAckSMS(WPARAM, LPARAM lParam)
{
CLISTEVENT *cle = (CLISTEVENT*)lParam;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(cle->hDbEvent)) == -1)
return 1;
dbei.pBlob = (PBYTE)_alloca(dbei.cbBlob);
@@ -133,7 +133,7 @@ int ReadAckSMS(WPARAM, LPARAM lParam)
void RestoreUnreadMessageAlerts(void)
{
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp
index e4f50f03e8..e5e0233eda 100644
--- a/plugins/SMS/src/receive.cpp
+++ b/plugins/SMS/src/receive.cpp
@@ -48,7 +48,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam)
if (GetXMLFieldEx(lpszXML, dwXMLSize, &lpszPhone, &dwPhoneSize, "sms_message", "sender", NULL)) {
LPSTR lpszMessageUTF;
size_t dwBuffLen, dwMessageXMLEncodedSize, dwMessageXMLDecodedSize;
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
dwBuffLen = (dwDataSize + MAX_PATH);
dbei.pBlob = (LPBYTE)MEMALLOC((dwBuffLen + dwPhoneSize));
@@ -91,8 +91,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam)
dwPhoneSize = MultiByteToWideChar(CP_UTF8, 0, szPhone, (int)dwPhoneSize, tszPhone, MAX_PHONE_LEN);
MCONTACT hContact = HContactFromPhone(tszPhone, dwPhoneSize);
- DBEVENTINFO dbei = { 0 };
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = {};
dbei.szModule = GetModuleName(hContact);
dbei.timestamp = time(NULL);
dbei.flags = DBEF_UTF;
@@ -210,7 +209,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent)
{
char szServiceFunction[MAX_PATH], *pszServiceFunctionName;
wchar_t szToolTip[MAX_PATH];
- DBEVENTINFO dbei = { sizeof(dbei) };
+ DBEVENTINFO dbei = {};
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1)
return 0;
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp
index 637ccfae0c..c1fb06c02d 100644
--- a/plugins/SMS/src/senddlg.cpp
+++ b/plugins/SMS/src/senddlg.cpp
@@ -733,7 +733,6 @@ void SendSMSWindowDBAdd(HWND hWndDlg)
{
SEND_SMS_WINDOW_DATA *psswdWindowData = GET_WINDOW_DATA(hWndDlg);
if (psswdWindowData) {
- psswdWindowData->pdbei->cbSize = sizeof(DBEVENTINFO);
psswdWindowData->pdbei->szModule = GetModuleName(psswdWindowData->hContact);
db_event_add(psswdWindowData->hContact, psswdWindowData->pdbei);
MEMFREE(psswdWindowData->pdbei);