summaryrefslogtreecommitdiff
path: root/plugins/WebView/src/webview_alerts.cpp
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/WebView/src/webview_alerts.cpp
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/WebView/src/webview_alerts.cpp')
-rw-r--r--plugins/WebView/src/webview_alerts.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 6d879a0b42..e583c4ed4e 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -271,15 +271,15 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
int alertIndex = 0, eventIndex = 0;
char tempraw[MAXSIZE1];
- ZeroMemory(&tempraw, sizeof(tempraw));
- ZeroMemory(&raw, sizeof(raw));
+ memset(&tempraw, 0, sizeof(tempraw));
+ memset(&raw, 0, sizeof(raw));
strncpy(tempraw, truncated, SIZEOF(tempraw));
- ZeroMemory(&alertstring, sizeof(alertstring));
- ZeroMemory(&Alerttempstring, sizeof(Alerttempstring));
- ZeroMemory(&Alerttempstring2, sizeof(Alerttempstring2));
- ZeroMemory(&cachecompare, sizeof(cachecompare));
+ memset(&alertstring, 0, sizeof(alertstring));
+ memset(&Alerttempstring, 0, sizeof(Alerttempstring));
+ memset(&Alerttempstring2, 0, sizeof(Alerttempstring2));
+ memset(&cachecompare, 0, sizeof(cachecompare));
// alerts
if (db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) { // ALERTS
@@ -436,7 +436,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
- ZeroMemory(&cachecompare, sizeof(cachecompare));
+ memset(&cachecompare, 0, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
fclose(pcachefile);
}
@@ -532,20 +532,20 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
alertpos = strstr(tempraw, Alerttempstring);
statalertpos = alertpos - tempraw;
- ZeroMemory(&alertpos, sizeof(alertpos));
+ memset(&alertpos, 0, sizeof(alertpos));
//end string
alertpos = strstr(tempraw, Alerttempstring2);
statalertposend = alertpos - tempraw + (int)strlen(Alerttempstring2);
if (statalertpos > statalertposend) {
memset(&tempraw, ' ', statalertpos);
- ZeroMemory(&alertpos, sizeof(alertpos));
+ memset(&alertpos, 0, sizeof(alertpos));
alertpos = strstr(tempraw, Alerttempstring2);
statalertposend = alertpos - tempraw + (int)strlen(Alerttempstring2);
}
if (statalertpos < statalertposend) {
- ZeroMemory(&raw, sizeof(raw));
+ memset(&raw, 0, sizeof(raw));
//start string
alertpos = strstr(tempraw, Alerttempstring);
@@ -557,7 +557,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if (statalertpos > statalertposend) {
memset(&tempraw, ' ', statalertpos);
- ZeroMemory(&alertpos, sizeof(alertpos));
+ memset(&alertpos, 0, sizeof(alertpos));
alertpos = strstr(tempraw, Alerttempstring2);
statalertposend = alertpos - tempraw + (int)strlen(Alerttempstring2);
}
@@ -648,7 +648,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
- ZeroMemory(&cachecompare, sizeof(cachecompare));
+ memset(&cachecompare, 0, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
fclose(pcachefile);
}