diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 00:07:01 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 00:07:01 +0000 |
commit | b2fad485cd5b41744ef0cc4a02722c021afd926c (patch) | |
tree | aa19403cd699066600e8306be8ad33e4a17fba6f /plugins/NewAwaySysMod | |
parent | fc62f1f1e1f8af40a1f7efe0ba3afc358fb66ef3 (diff) |
ZeroMemory -> memset, few bugs fised
git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod')
-rw-r--r-- | plugins/NewAwaySysMod/src/AwaySys.cpp | 10 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/ContactList.cpp | 4 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/src/Services.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index f5a43e8753..2da6d364d3 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -245,7 +245,7 @@ int StatusChanged(WPARAM wParam, LPARAM lParam) }
else {
SetAwayMsgData *dat = new SetAwayMsgData;
- ZeroMemory(dat, sizeof(SetAwayMsgData));
+ memset(dat, 0, sizeof(SetAwayMsgData));
dat->szProtocol = (char*)lParam;
dat->IsModeless = false;
DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_SETAWAYMSG), NULL, SetAwayMsgDlgProc, (LPARAM)dat);
@@ -359,7 +359,7 @@ static INT_PTR SetContactStatMsg(WPARAM hContact, LPARAM) }
SetAwayMsgData *dat = new SetAwayMsgData;
- ZeroMemory(dat, sizeof(SetAwayMsgData));
+ memset(dat, 0, sizeof(SetAwayMsgData));
dat->hInitContact = hContact;
dat->szProtocol = GetContactProto(hContact);
dat->IsModeless = false;
@@ -622,7 +622,7 @@ int MirandaLoaded(WPARAM, LPARAM) mi.pszService = MS_AWAYSYS_AUTOREPLY_TOGGLE;
g_hToggleSOEMenuItem = Menu_AddMainMenuItem(&mi);
- ZeroMemory(&mi, sizeof(mi));
+ memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = -2000005000;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE | CMIF_HIDDEN;
@@ -631,7 +631,7 @@ int MirandaLoaded(WPARAM, LPARAM) g_hReadStatMenuItem = Menu_AddContactMenuItem(&mi);
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_USEMENUITEM)) {
- ZeroMemory(&mi, sizeof(mi));
+ memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_HIDDEN;
mi.ptszName = LPGENT("Set status message"); // will never be shown
@@ -640,7 +640,7 @@ int MirandaLoaded(WPARAM, LPARAM) mi.pszService = MS_AWAYSYS_SETCONTACTSTATMSG;
g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
- ZeroMemory(&mi, sizeof(mi));
+ memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP;
mi.hIcon = NULL;
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index bc1fabe341..bdf5564e9a 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -370,7 +370,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact) return hContactItem;
TVINSERTSTRUCT tvIns;
- ZeroMemory(&tvIns, sizeof(tvIns));
+ memset(&tvIns, 0, sizeof(tvIns));
tvIns.hParent = AddGroup(db_get_s(hContact, "CList", "Group", _T("")));
tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvIns.hInsertAfter = TVI_ROOT;
@@ -405,7 +405,7 @@ HTREEITEM CCList::AddGroup(TCString GroupName) GroupEnumData.GroupName = GroupName;
GroupEnumData.hGroup = NULL;
DBCONTACTENUMSETTINGS dbEnum;
- ZeroMemory(&dbEnum, sizeof(dbEnum));
+ memset(&dbEnum, 0, sizeof(dbEnum));
dbEnum.lParam = (LPARAM)&GroupEnumData;
dbEnum.pfnEnumProc = GroupEnum;
dbEnum.szModule = "CListGroups";
diff --git a/plugins/NewAwaySysMod/src/Services.cpp b/plugins/NewAwaySysMod/src/Services.cpp index 686ad07cac..a1f2c42840 100644 --- a/plugins/NewAwaySysMod/src/Services.cpp +++ b/plugins/NewAwaySysMod/src/Services.cpp @@ -175,7 +175,7 @@ INT_PTR InvokeStatusWindow(WPARAM wParam, LPARAM) return (int)g_SetAwayMsgPage.GetWnd();
}
SetAwayMsgData *dat = new SetAwayMsgData;
- ZeroMemory(dat, sizeof(SetAwayMsgData));
+ memset(dat, 0, sizeof(SetAwayMsgData));
dat->hInitContact = iswi->hContact;
dat->szProtocol = iswi->szProto;
dat->Message = (iswi->Flags & ISWF_UNICODE) ? iswi->wszMsg : _A2T(iswi->szMsg);
|