summaryrefslogtreecommitdiff
path: root/plugins/Sessions
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Sessions')
-rw-r--r--plugins/Sessions/Src/Main.cpp8
-rw-r--r--plugins/Sessions/Src/Options.cpp2
-rw-r--r--plugins/Sessions/Src/Utils.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 92cf5d8b5b..3e3dfde266 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -322,7 +322,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM l
db_set_b(session_list_recovered[i], MODNAME, "wasInLastSession", 0);
i++;
}
- ZeroMemory(session_list_recovered, sizeof(session_list_recovered));
+ memset(session_list_recovered, 0, sizeof(session_list_recovered));
g_bIncompletedSave = 0;
EnableWindow(GetDlgItem(hdlg, IDC_SESSDEL), FALSE);
@@ -418,7 +418,7 @@ INT_PTR CloseCurrentSession(WPARAM wparam, LPARAM lparam)
}
else SendMessage(mwd.hwndWindow, WM_CLOSE, 0, 0);
}
- ZeroMemory(session_list, sizeof(session_list));
+ memset(session_list, 0, sizeof(session_list));
return 0;
}
@@ -820,7 +820,7 @@ static int PluginInit(WPARAM wparam, LPARAM lparam)
cl.position = 10100000;
Menu_AddMainMenuItem(&cl);
- ZeroMemory(&cl, sizeof(cl));
+ memset(&cl, 0, sizeof(cl));
cl.cbSize = sizeof(cl);
cl.flags = CMIM_ICON;
cl.icolibItem = iconList[4].hIcolib;
@@ -875,7 +875,7 @@ extern "C" __declspec(dllexport) int Load(void)
if (g_bIncompletedSave) {
int i = 0;
- ZeroMemory(session_list_recovered, sizeof(session_list_recovered));
+ memset(session_list_recovered, 0, sizeof(session_list_recovered));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, MODNAME, "wasInLastSession", 0))
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp
index e15609f625..25f60daaba 100644
--- a/plugins/Sessions/Src/Options.cpp
+++ b/plugins/Sessions/Src/Options.cpp
@@ -44,7 +44,7 @@ BOOL bChecked = FALSE;
int OpLoadSessionContacts(WPARAM wparam, LPARAM lparam)
{
- ZeroMemory(session_list_t, sizeof(session_list_t));
+ memset(session_list_t, 0, sizeof(session_list_t));
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (LoadContactsFromMask(hContact, 1, lparam)) {
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index 18605152d3..5143b637db 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -44,7 +44,7 @@ void AddSessionMark(MCONTACT hContact, int mode, char bit)
char *pszBuffer;
if (strlen(szValue) < g_ses_count) {
pszBuffer = (char*)mir_alloc(g_ses_count + 1);
- ZeroMemory(pszBuffer, g_ses_count + 1);
+ memset(pszBuffer, 0, (g_ses_count + 1));
strcpy(pszBuffer, szValue);
}
else pszBuffer = szValue.detouch();
@@ -160,8 +160,8 @@ void AddInSessionOrder(MCONTACT hContact, int mode, int ordernum, int writemode)
if (szValue) {
char *pszBuffer;
if (strlen(szValue) < (g_ses_count * 2)) {
- pszBuffer = (char*)mir_alloc(g_ses_count * 2 + 1);
- ZeroMemory(pszBuffer, g_ses_count * 2 + 1);
+ pszBuffer = (char*)mir_alloc((g_ses_count * 2) + 1);
+ memset(pszBuffer, 0, ((g_ses_count * 2) + 1));
strcpy(pszBuffer, szValue);
}
else pszBuffer = mir_strdup(szValue);