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 --- protocols/SkypeClassic/src/contacts.cpp | 2 +- protocols/SkypeClassic/src/debug.cpp | 4 ++-- protocols/SkypeClassic/src/skypeopt.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/SkypeClassic/src') diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index 7a24ed7f70..1e94deb493 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -182,7 +182,7 @@ HANDLE add_contextmenu(MCONTACT) { mi = BlockContactItem(); hMenuBlockContactItem = Menu_AddContactMenuItem(&mi); - ZeroMemory(&mi, sizeof(mi)); + memset(&mi, 0, sizeof(mi)); mi.cbSize = sizeof(mi); mi.position = -2000005000; mi.flags = CMIF_TCHAR; diff --git a/protocols/SkypeClassic/src/debug.cpp b/protocols/SkypeClassic/src/debug.cpp index beb19c6db6..4e7f7fd7b7 100644 --- a/protocols/SkypeClassic/src/debug.cpp +++ b/protocols/SkypeClassic/src/debug.cpp @@ -26,8 +26,8 @@ void init_debug(void) { char *p; char logfile[MAX_PATH]; - ZeroMemory(logfile, sizeof(logfile)); - p=logfile+GetModuleFileNameA(NULL, logfile, sizeof(logfile)); + memset(logfile, 0, sizeof(logfile)); + p=logfile+GetModuleFileNameA(NULL, logfile, SIZEOF(logfile)); if (!(p=strrchr (logfile, '\\'))) p=logfile; else p++; sprintf (p, "%s_log.txt", SKYPE_PROTONAME); m_szLogBuf = (char*)calloc (1, (m_iBufSize = INITBUF)); diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 3caea3d09f..246e3403a2 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -51,7 +51,7 @@ extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD); int RegisterOptions(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp; - ZeroMemory(&odp, sizeof(odp)); + memset(&odp, 0, sizeof(odp)); odp.cbSize = sizeof(odp); odp.hInstance = hInst; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); @@ -401,7 +401,7 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA db_set_w(NULL, SKYPE_PROTONAME, "Port", (unsigned short)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE)); db_set_b(NULL, SKYPE_PROTONAME, "RequiresPassword", (BYTE)(SendMessage(GetDlgItem(hwndDlg, IDC_REQPASS), BM_GETCHECK,0,0))); db_set_b (NULL, SKYPE_PROTONAME, "UseSkype2Socket", (BYTE)(SendMessage(GetDlgItem(hwndDlg, IDC_USES2S), BM_GETCHECK,0,0))); - ZeroMemory(buf, sizeof(buf)); + memset(buf, 0, sizeof(buf)); GetDlgItemTextA(hwndDlg, IDC_PASSWORD, buf, SIZEOF(buf)); db_set_s(NULL, SKYPE_PROTONAME, "Password", buf); return TRUE; @@ -853,7 +853,7 @@ INT_PTR CALLBACK DetailsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) case WM_INITDIALOG: TranslateDialogDefault( hwndDlg ); - ZeroMemory (&myProfile, sizeof(myProfile)); + memset(&myProfile, 0, sizeof(myProfile)); SkypeProfile_Load(&myProfile); if(SkypeInitialized) SkypeProfile_LoadFromSkype(&myProfile); -- cgit v1.2.3