From b2fad485cd5b41744ef0cc4a02722c021afd926c Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 1 Dec 2014 00:07:01 +0000 Subject: ZeroMemory -> memset, few bugs fised git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/src/browser/badconnect.cpp | 6 +++--- plugins/YAMN/src/browser/mailbrowser.cpp | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/YAMN/src/browser') diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 3387028fc8..eeccc75553 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -20,7 +20,7 @@ LRESULT CALLBACK BadConnectPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPa if ((HIWORD(wParam)==STN_CLICKED) && (CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, (LPARAM)&PluginParam))) { PROCESS_INFORMATION pi; STARTUPINFOW si; - ZeroMemory(&si,sizeof(si)); + memset(&si, 0, sizeof(si)); si.cb=sizeof(si); HACCOUNT ActualAccount = (HACCOUNT)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0); #ifdef DEBUG_SYNCHRO @@ -167,7 +167,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA { NOTIFYICONDATA nid; - ZeroMemory(&nid,sizeof(NOTIFYICONDATA)); + memset(&nid, 0, sizeof(NOTIFYICONDATA)); nid.cbSize=sizeof(NOTIFYICONDATA); nid.hWnd=hDlg; nid.uID=0; @@ -242,7 +242,7 @@ DWORD WINAPI BadConnection(LPVOID Param) SendMessage(hBadConnect,WM_SETICON,ICON_BIG,(LPARAM)g_LoadIconEx(3)); SendMessage(hBadConnect,WM_SETICON,ICON_SMALL,(LPARAM)g_LoadIconEx(3)); - ZeroMemory(&nid,sizeof(nid)); + memset(&nid, 0, sizeof(nid)); nid.cbSize=sizeof(NOTIFYICONDATA); nid.hWnd=hBadConnect; nid.hIcon=g_LoadIconEx(3); diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index c983eadddf..125365ec54 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -357,7 +357,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags) DebugLog(SynchroFile,"UpdateMails:ActualAccountMsgsSO-write enter\n"); #endif - ZeroMemory(&MN,sizeof(MN)); + memset(&MN, 0, sizeof(MN)); for (msgq=(HYAMNMAIL)ActualAccount->Mails;msgq != NULL;msgq=msgq->Next) { @@ -498,14 +498,14 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb struct CHeader UnicodeHeader; BOOL Loaded,Extracted,FromStrNew=FALSE; - ZeroMemory(&item,sizeof(item)); - ZeroMemory(&UnicodeHeader,sizeof(UnicodeHeader)); + memset(&item, 0, sizeof(item)); + memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); if (hListView != NULL) { item.mask=LVIF_TEXT | LVIF_PARAM; item.iItem=0; - ZeroMemory(&fi,sizeof(fi)); + memset(&fi, 0, sizeof(fi)); fi.flags=LVFI_PARAM; //let's go search item by lParam number lfoundi=0; } @@ -623,7 +623,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb if (Extracted) { DeleteHeaderContent(&UnicodeHeader); - ZeroMemory(&UnicodeHeader,sizeof(UnicodeHeader)); + memset(&UnicodeHeader, 0, sizeof(UnicodeHeader)); } if (!Loaded) @@ -641,7 +641,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR char *NotIconText = Translate("- new mail message(s)"); NOTIFYICONDATA nid; - ZeroMemory(&nid,sizeof(nid)); + memset(&nid, 0, sizeof(nid)); if (MN->Real.EventNC+MN->Virtual.EventNC) NotifyEventHooks(hNewMailHook,0,0); @@ -751,7 +751,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR { PROCESS_INFORMATION pi; STARTUPINFOW si; - ZeroMemory(&si,sizeof(si)); + memset(&si, 0, sizeof(si)); si.cb=sizeof(si); if (ActualAccount->NewMailN.App != NULL) @@ -1188,8 +1188,8 @@ int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2,LPARAM lParamSor HYAMNMAIL email2 = (HYAMNMAIL)lParam2; struct CShortHeader Header1; struct CShortHeader Header2; - ZeroMemory(&Header1,sizeof(Header1)); - ZeroMemory(&Header2,sizeof(Header2)); + memset(&Header1, 0, sizeof(Header1)); + memset(&Header2, 0, sizeof(Header2)); try { ExtractShortHeader(email1->MailData->TranslatedHeader,&Header1); @@ -1829,7 +1829,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM #endif WriteDoneFcn(ActualAccount->MessagesAccessSO); - ZeroMemory(&nid,sizeof(NOTIFYICONDATA)); + memset(&nid, 0, sizeof(NOTIFYICONDATA)); delete mwui; SetWindowLongPtr(hDlg,DWLP_USER,(LONG_PTR)NULL); @@ -2056,7 +2056,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM PROCESS_INFORMATION pi; STARTUPINFOW si; - ZeroMemory(&si,sizeof(si)); + memset(&si, 0, sizeof(si)); si.cb=sizeof(si); #ifdef DEBUG_SYNCHRO @@ -2226,7 +2226,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM NOTIFYICONDATA nid; struct CMailWinUserInfo *mwui=(struct CMailWinUserInfo *)GetWindowLongPtr(hDlg,DWLP_USER); - ZeroMemory(&nid,sizeof(nid)); + memset(&nid, 0, sizeof(nid)); nid.cbSize=sizeof(NOTIFYICONDATA); nid.hWnd=hDlg; nid.uID=0; -- cgit v1.2.3