summaryrefslogtreecommitdiff
path: root/src/core/stdchat
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 /src/core/stdchat
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 'src/core/stdchat')
-rw-r--r--src/core/stdchat/src/log.cpp4
-rw-r--r--src/core/stdchat/src/main.cpp2
-rw-r--r--src/core/stdchat/src/manager.cpp2
-rw-r--r--src/core/stdchat/src/message.cpp2
-rw-r--r--src/core/stdchat/src/richutil.cpp4
-rw-r--r--src/core/stdchat/src/window.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/core/stdchat/src/log.cpp b/src/core/stdchat/src/log.cpp
index 94c59430c6..2ba54448ac 100644
--- a/src/core/stdchat/src/log.cpp
+++ b/src/core/stdchat/src/log.cpp
@@ -61,7 +61,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedr
HWND hwndRich = GetDlgItem(hwndDlg, IDC_LOG);
LOGSTREAMDATA streamData;
- ZeroMemory(&streamData, sizeof(streamData));
+ memset(&streamData, 0, sizeof(streamData));
streamData.hwnd = hwndRich;
streamData.si = si;
streamData.lin = lin;
@@ -125,7 +125,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedr
newsel.cpMin = sel.cpMin;
if (newsel.cpMin < 0)
newsel.cpMin = 0;
- ZeroMemory(&sm, sizeof(sm));
+ memset(&sm, 0, sizeof(sm));
sm.cbSize = sizeof(sm);
sm.hwndRichEditControl = hwndRich;
sm.Protocolname = si->pszModule;
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp
index 63fd05a2f4..9437b3a034 100644
--- a/src/core/stdchat/src/main.cpp
+++ b/src/core/stdchat/src/main.cpp
@@ -317,7 +317,7 @@ static void RegisterFonts()
static void TabsInit()
{
- ZeroMemory(&g_TabSession, sizeof(SESSION_INFO));
+ memset(&g_TabSession, 0, sizeof(SESSION_INFO));
g_TabSession.iType = GCW_TABROOM;
g_TabSession.iSplitterX = g_Settings.iSplitterX;
g_TabSession.iSplitterY = g_Settings.iSplitterY;
diff --git a/src/core/stdchat/src/manager.cpp b/src/core/stdchat/src/manager.cpp
index a16e6a02d8..d9f0d2c61a 100644
--- a/src/core/stdchat/src/manager.cpp
+++ b/src/core/stdchat/src/manager.cpp
@@ -85,7 +85,7 @@ BOOL TabM_AddTab(const TCHAR *pszID, const char* pszModule)
return FALSE;
node = (TABLIST*)mir_alloc(sizeof(TABLIST));
- ZeroMemory(node, sizeof(TABLIST));
+ memset(node, 0, sizeof(TABLIST));
node->pszID = mir_tstrdup(pszID);
node->pszModule = mir_strdup(pszModule);
diff --git a/src/core/stdchat/src/message.cpp b/src/core/stdchat/src/message.cpp
index bcd066e4a9..c7d96fa2a5 100644
--- a/src/core/stdchat/src/message.cpp
+++ b/src/core/stdchat/src/message.cpp
@@ -342,7 +342,7 @@ char* Message_GetFromStream(HWND hwndDlg, SESSION_INFO *si)
if (hwndDlg == 0 || si == 0)
return NULL;
- ZeroMemory(&stream, sizeof(stream));
+ memset(&stream, 0, sizeof(stream));
stream.pfnCallback = Message_StreamCallback;
stream.dwCookie = (DWORD_PTR)&pszText; // pass pointer to pointer
diff --git a/src/core/stdchat/src/richutil.cpp b/src/core/stdchat/src/richutil.cpp
index 8bcc79b509..bc9a22aac5 100644
--- a/src/core/stdchat/src/richutil.cpp
+++ b/src/core/stdchat/src/richutil.cpp
@@ -137,7 +137,7 @@ int RichUtil_SubClass(HWND hwndEdit) {
if (IsWindow(hwndEdit)) {
TRichUtil *ru = (TRichUtil*)malloc(sizeof(TRichUtil));
- ZeroMemory(ru, sizeof(TRichUtil));
+ memset(ru, 0, sizeof(TRichUtil));
ru->hwnd = hwndEdit;
ru->hasUglyBorder = 0;
EnterCriticalSection(&csRich);
@@ -212,7 +212,7 @@ static LRESULT CALLBACK RichUtil_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
RECT rcClient;
HDC hdc = GetDC(GetParent(hwnd));
- ZeroMemory(&rcClient, sizeof(RECT));
+ memset(&rcClient, 0, sizeof(RECT));
if(GetThemeBackgroundContentRect(hTheme, hdc, EP_EDITTEXT, ETS_NORMAL, &ncsParam->rgrc[0], &rcClient) == S_OK) {
ru->rect.left = rcClient.left-ncsParam->rgrc[0].left;
ru->rect.top = rcClient.top-ncsParam->rgrc[0].top;
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index 15d1e0e6d8..2d9b797540 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -2127,7 +2127,7 @@ LABEL_SHOWWINDOW:
if (end - start > 0) {
TEXTRANGE tr;
- ZeroMemory(&tr, sizeof(TEXTRANGE));
+ memset(&tr, 0, sizeof(TEXTRANGE));
CHARRANGE cr;
cr.cpMin = start;