summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus
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/SendScreenshotPlus
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/SendScreenshotPlus')
-rw-r--r--plugins/SendScreenshotPlus/src/CSend.cpp10
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/ctrl_button.cpp10
6 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp
index 318567cb90..cc1e5d40c7 100644
--- a/plugins/SendScreenshotPlus/src/CSend.cpp
+++ b/plugins/SendScreenshotPlus/src/CSend.cpp
@@ -234,8 +234,8 @@ void CSend::svcSendMsgExit(const char* szMessage) {
}else{
mir_freeAndNil(m_szEventMsg);
m_cbEventMsg=mir_strlen(szMessage)+1;
- m_szEventMsg=(char*)mir_realloc(m_szEventMsg, sizeof(char)*m_cbEventMsg);
- ZeroMemory(m_szEventMsg, m_cbEventMsg);
+ m_szEventMsg=(char*)mir_realloc(m_szEventMsg, (sizeof(char) * m_cbEventMsg));
+ memset(m_szEventMsg, 0, (sizeof(char) * m_cbEventMsg));
mir_strcpy(m_szEventMsg,szMessage);
if (m_pszFileDesc && m_pszFileDesc[0] != NULL) {
char *temp = mir_t2a(m_pszFileDesc);
@@ -273,8 +273,8 @@ void CSend::svcSendFileExit() {
mir_freeAndNil(m_szEventMsg);
char* szFile = mir_t2a(m_pszFile);
m_cbEventMsg=mir_strlen(szFile)+2;
- m_szEventMsg=(char*)mir_realloc(m_szEventMsg, sizeof(char)*m_cbEventMsg);
- ZeroMemory(m_szEventMsg, m_cbEventMsg);
+ m_szEventMsg=(char*)mir_realloc(m_szEventMsg, (sizeof(char) * m_cbEventMsg));
+ memset(m_szEventMsg, 0, (sizeof(char) * m_cbEventMsg));
mir_strcpy(m_szEventMsg,szFile);
if (m_pszFileDesc && m_pszFileDesc[0] != NULL) {
char* temp = mir_t2a(m_pszFileDesc);
@@ -391,7 +391,7 @@ void CSend::Error(LPCTSTR pszFormat, ...) {
va_end(vl);
mir_free(m_ErrorMsg), m_ErrorMsg = mir_tstrdup(tszMsg);
- ZeroMemory(&m_box, sizeof(MSGBOX));
+ memset(&m_box, 0, sizeof(MSGBOX));
m_box.cbSize = sizeof(MSGBOX);
m_box.hParent = NULL;
m_box.hiLogo = Skin_GetIcon(ICO_COMMON_SSWINDOW1);
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
index 95b41262cf..5bb28a8da2 100644
--- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp
@@ -68,7 +68,7 @@ int CSendHTTPServer::Send()
replaceStrT(m_fsi_pszRealPath, m_pszFile);
- ZeroMemory(&m_fsi, sizeof(m_fsi));
+ memset(&m_fsi, 0, sizeof(m_fsi));
m_fsi.lStructSize = sizeof(STFileShareInfo);
m_fsi.pszSrvPath = m_fsi_pszSrvPath;
m_fsi.nMaxDownloads = -1; // -1 = infinite
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
index b4dc0dde92..d53a11c495 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_ImageShack.cpp
@@ -46,7 +46,7 @@ int CSendHost_ImageShack::Send() {
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
- ZeroMemory(&m_nlhr, sizeof(m_nlhr));
+ memset(&m_nlhr, 0, sizeof(m_nlhr));
char* tmp; tmp=mir_t2a(m_pszFile);
HTTPFormData frm[]={
// {"Referer",HTTPFORM_HEADER("http://www.imageshack.us/upload_api.php")},
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
index 1a4063e710..77be71704f 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp
@@ -33,7 +33,7 @@ int CSendHost_Imgur::Send()
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
- ZeroMemory(&m_nlhr, sizeof(m_nlhr));
+ memset(&m_nlhr, 0, sizeof(m_nlhr));
char* tmp; tmp=mir_t2a(m_pszFile);
HTTPFormData frm[]={
{"Authorization",HTTPFORM_HEADER("Client-ID 2a7303d78abe041")},
diff --git a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
index 73830c7052..a3a640b986 100644
--- a/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendHost_uploadpie.cpp
@@ -33,7 +33,7 @@ int CSendHost_UploadPie::Send()
Exit(ACKRESULT_FAILED);
return !m_bAsync;
}
- ZeroMemory(&m_nlhr, sizeof(m_nlhr));
+ memset(&m_nlhr, 0, sizeof(m_nlhr));
char* tmp; tmp=mir_t2a(m_pszFile);
HTTPFormData frm[]={
{"MAX_FILE_SIZE",HTTPFORM_INT(3145728)},// ??
diff --git a/plugins/SendScreenshotPlus/src/ctrl_button.cpp b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
index 41773048c5..c42f35fa2e 100644
--- a/plugins/SendScreenshotPlus/src/ctrl_button.cpp
+++ b/plugins/SendScreenshotPlus/src/ctrl_button.cpp
@@ -365,7 +365,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
cs->style |= BS_OWNERDRAW;
if (!(bct = (LPBTNCTRL)mir_alloc(sizeof(BTNCTRL))))
return FALSE;
- ZeroMemory(bct, sizeof(BTNCTRL));
+ memset(bct, 0, sizeof(BTNCTRL));
bct->hwnd = hwndBtn;
bct->stateId = PBS_NORMAL;
bct->hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
@@ -383,7 +383,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
if (hwndToolTips) {
TOOLINFO ti;
- ZeroMemory(&ti, sizeof(ti));
+ memset(&ti, 0, sizeof(ti));
ti.cbSize = sizeof(ti);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -515,7 +515,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
if (lParam == MBBF_UNICODE) {
TOOLINFOW ti;
- ZeroMemory(&ti, sizeof(TOOLINFOW));
+ memset(&ti, 0, sizeof(TOOLINFOW));
ti.cbSize = sizeof(TOOLINFOW);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -531,7 +531,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L
else {
TOOLINFOA ti;
- ZeroMemory(&ti, sizeof(TOOLINFOA));
+ memset(&ti, 0, sizeof(TOOLINFOA));
ti.cbSize = sizeof(TOOLINFOA);
ti.uFlags = TTF_IDISHWND;
ti.hwnd = bct->hwnd;
@@ -638,7 +638,7 @@ void CtrlButtonLoadModule()/// @fixme : compatibility with UInfoEx is everything
WNDCLASSEX wc;
g_init=true;
- ZeroMemory(&wc, sizeof(wc));
+ memset(&wc, 0, sizeof(wc));
wc.cbSize = sizeof(wc);
wc.lpszClassName = UINFOBUTTONCLASS;
wc.lpfnWndProc = Button_WndProc;