summaryrefslogtreecommitdiff
path: root/plugins/YAMN/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/YAMN/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/YAMN/src')
-rw-r--r--plugins/YAMN/src/account.cpp8
-rw-r--r--plugins/YAMN/src/browser/badconnect.cpp6
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp24
-rw-r--r--plugins/YAMN/src/mails/mime.cpp2
-rw-r--r--plugins/YAMN/src/proto/netlib.cpp2
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp9
6 files changed, 24 insertions, 27 deletions
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp
index 32b44dcd33..612ac7181a 100644
--- a/plugins/YAMN/src/account.cpp
+++ b/plugins/YAMN/src/account.cpp
@@ -109,10 +109,10 @@ int InitAccount(HACCOUNT Which)
SWMRGInitialize(Which->MessagesAccessSO,NULL);
//zero memory, where timestamps are stored
- ZeroMemory(&Which->LastChecked,sizeof(Which->LastChecked));
- ZeroMemory(&Which->LastSChecked,sizeof(Which->LastSChecked));
- ZeroMemory(&Which->LastSynchronised,sizeof(Which->LastSynchronised));
- ZeroMemory(&Which->LastMail,sizeof(Which->LastMail));
+ memset(&Which->LastChecked, 0, sizeof(Which->LastChecked));
+ memset(&Which->LastSChecked, 0, sizeof(Which->LastSChecked));
+ memset(&Which->LastSynchronised, 0, sizeof(Which->LastSynchronised));
+ memset(&Which->LastMail, 0, sizeof(Which->LastMail));
Which->Name=NULL;
Which->Mails=NULL;
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;
diff --git a/plugins/YAMN/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp
index 30706d9cc2..0be13215dc 100644
--- a/plugins/YAMN/src/mails/mime.cpp
+++ b/plugins/YAMN/src/mails/mime.cpp
@@ -347,7 +347,7 @@ void ExtractHeader(struct CMimeItem *items,int &CP,struct CHeader *head)
{
struct CShortHeader ShortHeader;
- ZeroMemory(&ShortHeader,sizeof(struct CShortHeader));
+ memset(&ShortHeader, 0, sizeof(struct CShortHeader));
ShortHeader.Priority=ShortHeader.CP=-1;
#ifdef DEBUG_DECODE
DebugLog(DecodeFile,"<Extracting header>\n");
diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp
index e9a1f61dd9..0e1e9ab5a5 100644
--- a/plugins/YAMN/src/proto/netlib.cpp
+++ b/plugins/YAMN/src/proto/netlib.cpp
@@ -215,7 +215,7 @@ char* CNLClient::Recv(char *buf,int buflen) throw(DWORD)
}
}
- ZeroMemory(buf,buflen);
+ memset(buf, 0, buflen);
if (SOCKET_ERROR==(Rcv=LocalNetlib_Recv(hConnection,buf,buflen,MSG_DUMPASTEXT)))
{
free(buf);
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index 455a981ca0..83fc6b93ce 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -1329,12 +1329,9 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa
BOOL TesterFC = (IsDlgButtonChecked(hDlg,IDC_CHECKFCOL)==BST_CHECKED);
BOOL TesterNC = (IsDlgButtonChecked(hDlg,IDC_CHECKNCOL)==BST_CHECKED);
- ZeroMemory(&Tester,sizeof(Tester));
- ZeroMemory(&TesterF,sizeof(TesterF));
- ZeroMemory(&TesterF,sizeof(TesterN));
- Tester.lchContact=NULL;
- TesterF.lchContact=NULL;
- TesterN.lchContact=NULL;
+ memset(&Tester, 0, sizeof(Tester));
+ memset(&TesterF, 0, sizeof(TesterF));
+ memset(&TesterN, 0, sizeof(TesterN));
Tester.lchIcon=g_LoadIconEx(2);
TesterF.lchIcon=g_LoadIconEx(3);
TesterN.lchIcon=g_LoadIconEx(1);