summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-01 00:07:01 +0000
commitb2fad485cd5b41744ef0cc4a02722c021afd926c (patch)
treeaa19403cd699066600e8306be8ad33e4a17fba6f /plugins/UserInfoEx/src
parentfc62f1f1e1f8af40a1f7efe0ba3afc358fb66ef3 (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/UserInfoEx/src')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp2
-rw-r--r--plugins/UserInfoEx/src/classMTime.cpp6
-rw-r--r--plugins/UserInfoEx/src/classPsTree.cpp2
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_base.cpp6
-rw-r--r--plugins/UserInfoEx/src/ctrl_button.cpp10
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp8
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp14
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp13
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp20
-rw-r--r--plugins/UserInfoEx/src/init.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_profile.cpp12
-rw-r--r--plugins/UserInfoEx/src/svc_timezone_old.cpp2
14 files changed, 50 insertions, 53 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
index 6255e8cbad..61fab1365b 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp
@@ -255,7 +255,7 @@ static INT_PTR ServiceCreateMergedFlagIcon(WPARAM wParam,LPARAM lParam)
if (hUpperIcon!=NULL && GetObject(icoi.hbmColor,sizeof(bm),&bm)) {
hdc=CreateCompatibleDC(NULL);
if (hdc!=NULL) {
- ZeroMemory(&aptTriangle,sizeof(aptTriangle));
+ memset(&aptTriangle, 0, sizeof(aptTriangle));
aptTriangle[1].y=bm.bmHeight-1;
aptTriangle[2].x=bm.bmWidth-1;
hrgn=CreatePolygonRgn(aptTriangle,SIZEOF(aptTriangle),WINDING);
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp
index 10c9d77a23..9ca9591b26 100644
--- a/plugins/UserInfoEx/src/classMTime.cpp
+++ b/plugins/UserInfoEx/src/classMTime.cpp
@@ -70,7 +70,7 @@ MTime::MTime(const MTime& mtime)
void MTime::ZeroDate()
{
_isLocal = FALSE;
- ZeroMemory(&_SysTime, sizeof(_SysTime));
+ memset(&_SysTime, 0, sizeof(_SysTime));
}
/*********************************************
@@ -169,7 +169,7 @@ void MTime::UTCToLocal()
if (!IsLocal()) {
TIME_ZONE_INFORMATION tzInfo;
- ZeroMemory(&tzInfo, sizeof(TIME_ZONE_INFORMATION));
+ memset(&tzInfo, 0, sizeof(TIME_ZONE_INFORMATION));
GetTimeZoneInformation(&tzInfo);
UTCToTzSpecificLocal(&tzInfo);
}
@@ -181,7 +181,7 @@ void MTime::UTCToTzSpecificLocal(int tzh)
TIME_ZONE_INFORMATION tzInfo;
if (IsLocal()) LocalToUTC();
- ZeroMemory(&tzInfo, sizeof(TIME_ZONE_INFORMATION));
+ memset(&tzInfo, 0, sizeof(TIME_ZONE_INFORMATION));
if (tzh > 24) tzh = 24;
if (tzh < -24)tzh = -24;
diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp
index 4d774b0d2d..40efabafce 100644
--- a/plugins/UserInfoEx/src/classPsTree.cpp
+++ b/plugins/UserInfoEx/src/classPsTree.cpp
@@ -726,7 +726,7 @@ void CPsTree::PopupMenu()
// init popup menu
if (!(hPopup = CreatePopupMenu()))
return;
- ZeroMemory(&mii, sizeof(MENUITEMINFO));
+ memset(&mii, 0, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(mii);
mii.fMask = MIIM_STRING|MIIM_ID;
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
index 181c6ed7ed..28ff8c010c 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
@@ -258,7 +258,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex)
_numDates--;
if (wIndex < _numDates)
memmove(_pDates + wIndex, _pDates + wIndex + 1, (_numDates - wIndex) * sizeof(*_pDates));
- ZeroMemory(_pDates + _numDates, sizeof(*_pDates));
+ memset((_pDates + _numDates), 0, sizeof(*_pDates)); // XXX: check me: sizeof(*_pDates) -> (sizeof(*_pDates) - _numDates)
if (_curDate >= _numDates)
_curDate = _numDates - 1;
}
@@ -439,7 +439,7 @@ void CAnnivEditCtrl::OnMenuPopup()
if (hMenu = CreatePopupMenu()) {
SetFocus(_hBtnMenu);
- ZeroMemory(&mii, sizeof(MENUITEMINFO));
+ memset(&mii, 0, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID|MIIM_STRING|MIIM_STATE;
diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp
index 1151592fe5..28d664d82b 100644
--- a/plugins/UserInfoEx/src/ctrl_base.cpp
+++ b/plugins/UserInfoEx/src/ctrl_base.cpp
@@ -74,7 +74,7 @@ INT_PTR CALLBACK Ctrl_SetTextColour(HWND hCtrl, HDC hdc)
**/
CBaseCtrl::CBaseCtrl()
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
_cbSize = sizeof(CBaseCtrl);
}
@@ -84,7 +84,7 @@ CBaseCtrl::CBaseCtrl()
**/
CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
_cbSize = sizeof(CBaseCtrl);
_hwnd = GetDlgItem(hDlg, idCtrl);
if (!IsWindow(_hwnd)) throw;
@@ -100,7 +100,7 @@ CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting)
**/
CBaseCtrl::CBaseCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszModule, LPCSTR pszSetting)
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
_cbSize = sizeof(CBaseCtrl);
_hwnd = GetDlgItem(hDlg, idCtrl);
if (!IsWindow(_hwnd)) throw;
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp
index 9bb58ef736..8a85a81947 100644
--- a/plugins/UserInfoEx/src/ctrl_button.cpp
+++ b/plugins/UserInfoEx/src/ctrl_button.cpp
@@ -365,7 +365,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
cs->style |= BS_OWNERDRAW;
if (!(bct = (LPBTNCTRL)mir_alloc(sizeof(BTNCTRL))))
return FALSE;
- ZeroMemory(bct, sizeof(BTNCTRL));
+ memset(bct, 0, sizeof(BTNCTRL));
bct->hwnd = hwndBtn;
bct->stateId = PBS_NORMAL;
bct->hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
@@ -383,7 +383,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
if (hwndToolTips) {
TOOLINFO ti;
- ZeroMemory(&ti, sizeof(ti));
+ memset(&ti, 0, sizeof(ti));
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -515,7 +515,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
if (lParam == MBBF_UNICODE) {
TOOLINFOW ti;
- ZeroMemory(&ti, sizeof(TOOLINFOW));
+ memset(&ti, 0, sizeof(TOOLINFOW));
ti.cbSize = sizeof(TOOLINFOW);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -531,7 +531,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
else {
TOOLINFOA ti;
- ZeroMemory(&ti, sizeof(TOOLINFOA));
+ memset(&ti, 0, sizeof(TOOLINFOA));
ti.cbSize = sizeof(TOOLINFOA);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -634,7 +634,7 @@ void CtrlButtonLoadModule()
{
WNDCLASSEX wc;
- ZeroMemory(&wc, sizeof(wc));
+ memset(&wc, 0, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.lpszClassName = UINFOBUTTONCLASS;
wc.lpfnWndProc = Button_WndProc;
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index a64ad354f2..8028dbc8a1 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -611,7 +611,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if (!(hMenu = CreatePopupMenu())) return 0;
SetFocus((HWND)lParam);
- ZeroMemory(&mii, sizeof(MENUITEMINFO));
+ memset(&mii, 0, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID|MIIM_STRING|MIIM_FTYPE|MIIM_STATE;
mii.fType = MFT_STRING;
@@ -1082,7 +1082,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
cbex->pItems + (int)lParam + 1,
(cbex->numItems - (int)lParam - 1) * sizeof(CBEXITEMINTERN));
cbex->numItems--;
- ZeroMemory(cbex->pItems + cbex->numItems, sizeof(CBEXITEMINTERN));
+ memset((cbex->pItems + cbex->numItems), 0, sizeof(CBEXITEMINTERN));
CtrlContactWndProc(hwnd, CBEXM_SETCURSEL, lParam - 1, FALSE);
return TRUE;
}
@@ -1246,7 +1246,7 @@ int CtrlContactLoadModule()
{
WNDCLASSEX wc;
- ZeroMemory(&wc, sizeof(wc));
+ memset(&wc, 0, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.lpszClassName = UINFOCOMBOEXCLASS;
wc.lpfnWndProc = CtrlContactWndProc;
@@ -1343,7 +1343,7 @@ int CtrlContactAddMyItemsFromDB(
LPTSTR sms;
int bAnyItemIsChanged = 0;
- ZeroMemory(&cbi, sizeof(cbi));
+ memset(&cbi, 0, sizeof(cbi));
cbi.iItem = -1;
cbi.wMask = CBEXIM_ALL;
cbi.pszIcon = szIcon;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 304dc426ea..6ebf3bba69 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -701,7 +701,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (!(pPs = (LPPS)mir_alloc(sizeof(PS))))
return FALSE;
- ZeroMemory(pPs, sizeof(PS));
+ memset(pPs, 0, sizeof(PS));
if (!(pPs->pTree = new CPsTree(pPs)))
return FALSE;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index bc44363ab4..5d34c90513 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -38,7 +38,7 @@ CExImContactBase::CExImContactBase()
_pszAMPro = NULL;
_pszUIDKey = NULL;
_dbvUIDHash = NULL;
- ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
+ memset(&_dbvUID, 0, sizeof(DBVARIANT));
_hContact = INVALID_CONTACT_ID;
_isNewContact = FALSE;
}
@@ -60,7 +60,7 @@ CExImContactBase::~CExImContactBase()
MIR_FREE(_pszAMPro);
MIR_FREE(_pszUIDKey);
db_free(&_dbvUID);
- ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
+ memset(&_dbvUID, 0, sizeof(DBVARIANT));
}
/**
@@ -88,7 +88,7 @@ BYTE CExImContactBase::fromDB(MCONTACT hContact)
MIR_FREE(_pszGroup);
MIR_FREE(_pszUIDKey);
db_free(&_dbvUID);
- ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
+ memset(&_dbvUID, 0, sizeof(DBVARIANT));
// OWNER
if (!_hContact) return TRUE;
@@ -171,7 +171,7 @@ BYTE CExImContactBase::fromIni(LPSTR& row)
MIR_FREE(_pszGroup);
MIR_FREE(_pszUIDKey);
db_free(&_dbvUID);
- ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
+ memset(&_dbvUID, 0, sizeof(DBVARIANT));
_dbvUIDHash = 0;
// read uid value
@@ -303,7 +303,7 @@ void CExImContactBase::toIni(FILE* file, int modCount)
// Proto loadet - GetContactName(hContact,pszProto,0)
LPSTR pszCI = NULL;
CONTACTINFO ci;
- ZeroMemory(&ci, sizeof(ci));
+ memset(&ci, 0, sizeof(ci));
ci.cbSize = sizeof(ci);
ci.hContact = _hContact;
@@ -438,7 +438,7 @@ LPSTR CExImContactBase::uid2String(BYTE bPrependType)
r = (LPSTR)mir_alloc((baselen + 8));
if (r == NULL)
return NULL;
- ZeroMemory((r + baselen), 8);
+ memset((r + baselen), 0, 8);
ptr = r;
if (bPrependType) { // Allways true.
ptr[0] = 'n';
@@ -455,7 +455,7 @@ LPSTR CExImContactBase::uid2String(BYTE bPrependType)
r = (LPSTR)mir_alloc(baselen);
if (r == NULL)
return NULL;
- ZeroMemory(r, baselen);
+ memset(r, 0, baselen);
ptr = r;
if (bPrependType) { // XXX dead code.
ptr[0] = 'n';
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
index a809ad1a18..803afccde9 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp
@@ -114,8 +114,6 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara
// miranda button
switch (tbb->idCommand) {
case 41063:
- ZeroMemory(szBtnText, sizeof(szBtnText));
-
mir_tstrncpy(szBtnText, TranslateT("Miranda NG"), SIZEOF(szBtnText));
iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM)szBtnText);
if (iString != -1) tbb->iString = iString;
@@ -124,7 +122,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara
if (hWndToolTip) {
TOOLINFO ti;
- ZeroMemory(&ti, sizeof(ti));
+ memset(&ti, 0, sizeof(ti));
ti.cbSize = sizeof(ti);
ti.hwnd = hWnd;
ti.lpszText = TranslateT("Shows Miranda's installation directory.");
@@ -143,7 +141,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara
if (hWndToolTip) {
TOOLINFO ti;
- ZeroMemory(&ti, sizeof(ti));
+ memset(&ti, 0, sizeof(ti));
ti.cbSize = sizeof(ti);
ti.hwnd = hWnd;
ti.lpszText = TranslateT("Shows the directory with all your Miranda's profiles.");
@@ -202,10 +200,9 @@ static UINT_PTR CALLBACK OpenSaveFileDialogHook(HWND hDlg, UINT uMsg, WPARAM wPa
**/
static void GetInitialDir(LPSTR pszInitialDir)
{
- CHAR szRelative[MAX_PATH];
-
- ZeroMemory(szRelative, sizeof(szRelative));
+ char szRelative[MAX_PATH];
+ szRelative[0] = 0;
// is some standard path defined
if (!db_get_static(0, MODNAME, "vCardPath", szRelative, SIZEOF(szRelative))) {
if (!PathToAbsolute(szRelative, pszInitialDir))
@@ -248,7 +245,7 @@ static void SaveInitialDir(LPSTR pszInitialDir)
**/
static void InitOpenFileNameStruct(OPENFILENAMEA *pofn, HWND hWndParent, LPCSTR pszTitle, LPCSTR pszFilter, LPSTR pszInitialDir, LPSTR pszFile)
{
- ZeroMemory(pofn, sizeof(OPENFILENAME));
+ memset(pofn, 0, sizeof(OPENFILENAME));
pofn->hwndOwner = hWndParent;
pofn->lpstrTitle = pszTitle;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index bd6011c4d2..ffc2423ca2 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -39,8 +39,7 @@ static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WO
LPSTR temp = 0;
cchFileName--;
-
- ZeroMemory(pszFileName, cchFileName);
+ pszFileName[0] = 0;
switch (ExImContact->Typ) {
case EXIM_ALL:
@@ -83,6 +82,7 @@ static void DisplayNameToFileName(lpExImParam ExImContact, LPSTR pszFileName, WO
cchFileName--;
}
mir_free(temp);
+ pszFileName[0] = 0;
}
LPCSTR FilterString(lpExImParam ExImContact)
@@ -210,7 +210,7 @@ if (ExImContact->Typ == EXIM_ACCOUNT ||
INT_PTR svcExIm_MainExport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&ExIm, 0, sizeof(ExIm));
ExIm.hContact = INVALID_CONTACT_ID;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Export(&ExIm, (HWND)lParam);
@@ -219,7 +219,7 @@ INT_PTR svcExIm_MainExport_Service(WPARAM wParam, LPARAM lParam)
INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&ExIm, 0, sizeof(ExIm));
ExIm.hContact = INVALID_CONTACT_ID;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Import(&ExIm, (HWND)lParam);
@@ -232,7 +232,7 @@ INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam)
INT_PTR svcExIm_ContactExport_Service(WPARAM hContact, LPARAM lParam)
{
ExImParam ExIm;
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&ExIm, 0, sizeof(ExIm));
ExIm.hContact = hContact;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Export(&ExIm, (HWND)lParam);
@@ -241,7 +241,7 @@ INT_PTR svcExIm_ContactExport_Service(WPARAM hContact, LPARAM lParam)
INT_PTR svcExIm_ContactImport_Service(WPARAM hContact, LPARAM lParam)
{
ExImParam ExIm;
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&ExIm, 0, sizeof(ExIm));
ExIm.hContact = hContact;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Import(&ExIm, (HWND)lParam);
@@ -266,9 +266,9 @@ INT_PTR svcExIm_Group_Service(WPARAM wParam, LPARAM lParam)
ExImParam ExIm;
INT_PTR hItem = 0, hRoot = 0, hParent = 0;
TCHAR tszGroup[120], tszItem[120];
- ZeroMemory(&tszGroup, sizeof(tszGroup));
- ZeroMemory(&tszItem, sizeof(tszItem));
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&tszGroup, 0, sizeof(tszGroup));
+ memset(&tszItem, 0, sizeof(tszItem));
+ memset(&ExIm, 0, sizeof(ExIm));
LPTSTR ptszGroup = tszGroup;
LPTSTR ptszItem = tszItem;
@@ -329,7 +329,7 @@ typedef struct
INT_PTR svcExIm_Account_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
- ZeroMemory(&ExIm, sizeof(ExIm));
+ memset(&ExIm, 0, sizeof(ExIm));
HWND hClist = (HWND)CallService(MS_CLUI_GETHWNDTREE,0,0);
lpStatusMenuExecParam smep = (lpStatusMenuExecParam) CallService(MO_MENUITEMGETOWNERDATA, (WPARAM) lParam, NULL);
ExIm.pszName = mir_strdup(smep->proto);
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index 80b970961c..d0fc03cadd 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -163,7 +163,7 @@ extern "C" int __declspec(dllexport) Load(void)
ccEx.dwICC = ICC_WIN95_CLASSES | ICC_DATE_CLASSES;
InitCommonControlsEx(&ccEx);
- ZeroMemory(&myGlobals, sizeof(MGLOBAL));
+ memset(&myGlobals, 0, sizeof(MGLOBAL));
// init clist interface
mir_getCLI();
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp
index 6748e4de04..4931695c6a 100644
--- a/plugins/UserInfoEx/src/psp_profile.cpp
+++ b/plugins/UserInfoEx/src/psp_profile.cpp
@@ -252,7 +252,7 @@ static int ProfileList_EndLabelEdit(LPLISTCTRL pList, BYTE bSave)
DestroyWindow(pList->labelEdit.dropDown.hDrop);
DestroyWindow(hEdit);
ListView_RedrawItems(pList->hList, pList->labelEdit.iItem, pList->labelEdit.iItem);
- ZeroMemory(&pList->labelEdit, sizeof(pList->labelEdit));
+ memset(&pList->labelEdit, 0, sizeof(pList->labelEdit));
SetFocus(pList->hList);
return 0;
}
@@ -831,7 +831,7 @@ static LRESULT CALLBACK ProfileList_SubclassProc(HWND hwnd, UINT msg, WPARAM wPa
}
// show tip only for text that is larger than te listview can display
if (textSize.cx > rchWnd.right - rchWnd.left || textSize.cx > rcItem.right - rcItem.left) {
- ZeroMemory(&ti, sizeof(TOOLINFO));
+ memset(&ti, 0, sizeof(TOOLINFO));
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS | TTF_TRANSPARENT;
ti.hinst = ghInst;
@@ -1037,7 +1037,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
if (!hList || !(pList = (LPLISTCTRL)mir_alloc(sizeof(LISTCTRL))))
return FALSE;
- ZeroMemory(pList, sizeof(LISTCTRL));
+ memset(pList, 0, sizeof(LISTCTRL));
TranslateDialogDefault(hDlg);
Ctrl_InitTextColours();
@@ -1045,7 +1045,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
// init info structure
pList->hList = hList;
pList->nType = CTRL_LIST_PROFILE;
- ZeroMemory(&pList->labelEdit, sizeof(pList->labelEdit));
+ memset(&pList->labelEdit, 0, sizeof(pList->labelEdit));
SetUserData(hList, pList);
// set new window procedure
@@ -1080,7 +1080,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
SetWindowPos(pList->hTip, HWND_TOPMOST, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
- ZeroMemory(&ti, sizeof(TOOLINFO));
+ memset(&ti, 0, sizeof(TOOLINFO));
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS | TTF_TRANSPARENT;
ti.hinst = ghInst;
@@ -1274,7 +1274,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
pItem = ProfileList_GetItemData(((LPNMHDR)lParam)->hwndFrom, hi.iItem);
// insert menuitems
- ZeroMemory(&mii, sizeof(MENUITEMINFO));
+ memset(&mii, 0, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID|MIIM_STRING;
// insert "Add" Menuitem
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp
index 5ebe29ec83..a4d49edbeb 100644
--- a/plugins/UserInfoEx/src/svc_timezone_old.cpp
+++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CTimeZone::CTimeZone()
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
}
/**