diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 18:51:36 +0000 |
commit | 688f55ba998c19304a29727c910504903f4cc49a (patch) | |
tree | 69121ebb6d02bcf9e670428b11813087fc7f1640 /plugins/WebView/src/webview_getdata.cpp | |
parent | 4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff) |
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WebView/src/webview_getdata.cpp')
-rw-r--r-- | plugins/WebView/src/webview_getdata.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index eef98ee250..9de894fd3e 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -37,7 +37,6 @@ void GetData(void *param) int MallocSize = 0;
int DownloadSuccess = 0;
char*raw;
- char*szInfo;
char truncated[MAXSIZE1];
char truncated2[MAXSIZE2];
int trunccount = 0;
@@ -64,7 +63,6 @@ void GetData(void *param) ZeroMemory(&contactname, sizeof(contactname));
ZeroMemory(&tempstring, sizeof(tempstring));
ZeroMemory(&tempstring2, sizeof(tempstring2));
- ZeroMemory(&szInfo, sizeof(szInfo));
ZeroMemory(&dbv, sizeof(dbv));
ZeroMemory(&tstr, sizeof(tstr));
ZeroMemory(×tring, sizeof(timestring));
@@ -148,13 +146,13 @@ void GetData(void *param) db_set_ts(hContact, "CList", "StatusMsg", statusText);
}
if (nlhrReply->dataLength) {
- int cbLen = lstrlenA(nlhrReply->pData);
- szInfo = (char*)malloc(cbLen + 2);
- lstrcpynA(szInfo, nlhrReply->pData, cbLen);
- downloadsize = lstrlenA(nlhrReply->pData);
+ size_t cbLen = mir_strlen(nlhrReply->pData);
+ char *szInfo = (char*)malloc(cbLen + 2);
+ mir_strncpy(szInfo, nlhrReply->pData, cbLen);
+ downloadsize = mir_strlen(nlhrReply->pData);
trunccount = 0;
- lstrcpynA(truncated2, szInfo, MAXSIZE2);
+ mir_strncpy(truncated2, szInfo, MAXSIZE2);
free(szInfo);
////////////////////////////////////////////
@@ -193,7 +191,7 @@ void GetData(void *param) if (DownloadSuccess) {
// all the site
if (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 1)
- lstrcpynA(truncated, truncated2, MAXSIZE1);
+ mir_strncpy(truncated, truncated2, MAXSIZE1);
else { // use start and end string
// putting data into string
if (((strstr(truncated2, tempstring)) != 0) && ((strstr(truncated2, tempstring2)) != 0)) {
@@ -240,7 +238,7 @@ void GetData(void *param) trunccount = 0;
- lstrcpynA(truncated, raw, MAXSIZE1);
+ mir_strncpy(truncated, raw, MAXSIZE1);
free(raw);
|