summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat
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/TabSRMM/src/chat
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/TabSRMM/src/chat')
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/message.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp9
3 files changed, 10 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 9bc5f5dc47..162c597360 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -260,7 +260,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick)
int bufferAlloced = 0;
IEVIEWEVENTDATA ied;
IEVIEWEVENT event;
- ZeroMemory(&event, sizeof(event));
+ memset(&event, 0, sizeof(event));
event.cbSize = sizeof(event);
event.dwFlags = 0;
event.hwnd = streamData->dat->hwndIEView ? streamData->dat->hwndIEView : streamData->dat->hwndHPP;
@@ -271,7 +271,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick)
event.eventData = &ied;
event.count = 1;
- ZeroMemory(&ied, sizeof(ied));
+ memset(&ied, 0, sizeof(ied));
AddEventToBufferIEView(&buffer, &bufferEnd, &bufferAlloced, streamData, ptszNick);
ied.ptszNick = ptszNick;
ied.ptszText = buffer;
@@ -980,7 +980,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedr
HWND hwndRich = GetDlgItem(hwndDlg, IDC_CHAT_LOG);
LOGSTREAMDATA streamData;
- ZeroMemory(&streamData, sizeof(streamData));
+ memset(&streamData, 0, sizeof(streamData));
streamData.hwnd = hwndRich;
streamData.si = si;
streamData.lin = lin;
@@ -1043,7 +1043,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, bool bRedr
FINDTEXTEX fi, fi2;
CHARFORMAT2 cf2;
- ZeroMemory(&cf2, sizeof(CHARFORMAT2));
+ memset(&cf2, 0, sizeof(CHARFORMAT2));
cf2.cbSize = sizeof(cf2);
fi2.lpstrText = _T("#++~~");
diff --git a/plugins/TabSRMM/src/chat/message.cpp b/plugins/TabSRMM/src/chat/message.cpp
index 4c45d5bb11..2cbd1e4eba 100644
--- a/plugins/TabSRMM/src/chat/message.cpp
+++ b/plugins/TabSRMM/src/chat/message.cpp
@@ -336,7 +336,7 @@ char* Chat_Message_GetFromStream(HWND hwndDlg, SESSION_INFO *si)
char* pszText = NULL;
EDITSTREAM stream;
- ZeroMemory(&stream, sizeof(stream));
+ memset(&stream, 0, sizeof(stream));
stream.pfnCallback = Chat_Message_StreamCallback;
stream.dwCookie = (DWORD_PTR)&pszText; // pass pointer to pointer
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index e867a9083f..44a6cf6774 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -67,8 +67,8 @@ static void Chat_SetMessageLog(TWindowData *dat)
IEVIEWEVENT iee;
//CheckAndDestroyHPP(dat);
- ZeroMemory(&ieWindow, sizeof(ieWindow));
- ZeroMemory(&iee, sizeof(iee));
+ memset(&ieWindow, 0, sizeof(ieWindow));
+ memset(&iee, 0, sizeof(iee));
ieWindow.cbSize = sizeof(ieWindow);
ieWindow.iType = IEW_CREATE;
ieWindow.dwFlags = 0;
@@ -80,7 +80,8 @@ static void Chat_SetMessageLog(TWindowData *dat)
ieWindow.cy = 300;
CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
dat->hwndIEView = ieWindow.hwnd;
- ZeroMemory(&iee, sizeof(iee));
+
+ memset(&iee, 0, sizeof(iee));
iee.cbSize = sizeof(iee);
iee.iType = IEE_CLEAR_LOG;
iee.hwnd = dat->hwndIEView;
@@ -98,7 +99,7 @@ static void Chat_SetMessageLog(TWindowData *dat)
else if (iLogMode == WANT_HPP_LOG && dat->hwndHPP == 0) {
IEVIEWWINDOW ieWindow;
- ZeroMemory(&ieWindow, sizeof(ieWindow));
+ memset(&ieWindow, 0, sizeof(ieWindow));
//CheckAndDestroyIEView(dat);
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_CREATE;