From b2fad485cd5b41744ef0cc4a02722c021afd926c Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 1 Dec 2014 00:07:01 +0000 Subject: ZeroMemory -> memset, few bugs fised git-svn-id: http://svn.miranda-ng.org/main/trunk@11184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Spamotron/src/options.cpp | 4 ++-- plugins/Spamotron/src/sqlite3/sqlite3.c | 4 ++-- plugins/Spamotron/src/utils.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Spamotron/src') diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 169abca395..88f614d7d6 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -136,7 +136,7 @@ INT_PTR CALLBACK DlgProcOptionsMain(HWND optDlg, UINT msg, WPARAM wParam, LPARAM continue; lvi.pszText = mir_a2u(pd[i]->szName); ListView_InsertItem(hProtocolsList, &lvi); - ZeroMemory(protoOption, 256); + memset(protoOption, 0, sizeof(protoOption)); strcat(protoOption, "proto_"); strcat(protoOption, pd[i]->szName); ListView_SetCheckState(hProtocolsList, j++, _getOptB(protoOption, 0)); @@ -201,7 +201,7 @@ INT_PTR CALLBACK DlgProcOptionsMain(HWND optDlg, UINT msg, WPARAM wParam, LPARAM for (i = 0; i < numProtocols; i++) { ListView_GetItemText(hProtocolsList, i, 0, buf, 256); //wcstombs(protoName, buf, 256); - ZeroMemory(protoOption, 256); + memset(protoOption, 0, sizeof(protoOption)); strcat(protoOption, "proto_"); strcat(protoOption, mir_u2a(buf)); _setOptB(protoOption, ListView_GetCheckState(hProtocolsList, i)); diff --git a/plugins/Spamotron/src/sqlite3/sqlite3.c b/plugins/Spamotron/src/sqlite3/sqlite3.c index ec6d4d2c68..d9b165f088 100644 --- a/plugins/Spamotron/src/sqlite3/sqlite3.c +++ b/plugins/Spamotron/src/sqlite3/sqlite3.c @@ -26470,7 +26470,7 @@ static BOOL winceCreateLock(const char *zFilename, winFile *pFile){ BOOL bInit = TRUE; /* Initialize the local lockdata */ - ZeroMemory(&pFile->local, sizeof(pFile->local)); + memset(&pFile->local, 0, sizeof(pFile->local)); /* Replace the backslashes from the filename and lowercase it ** to derive a mutex name. */ @@ -26529,7 +26529,7 @@ static BOOL winceCreateLock(const char *zFilename, winFile *pFile){ /* Initialize the shared memory if we're supposed to */ if (bInit) { - ZeroMemory(pFile->shared, sizeof(winceLock)); + memset(pFile->shared, 0, sizeof(winceLock)); } winceMutexRelease(pFile->hMutex); diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 2fd9dff20f..c47406e435 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -490,7 +490,7 @@ void MarkUnread(MCONTACT hContact) pos = _dbv.pbVal; while (pos - _dbv.pbVal < _dbv.cpbVal) { DBEVENTINFO _dbei; - ZeroMemory(&_dbei, sizeof(_dbei)); + memset(&_dbei, 0, sizeof(_dbei)); _dbei.cbSize = sizeof(_dbei); memcpy(&_dbei.eventType, pos, sizeof(WORD)); pos += sizeof(WORD); -- cgit v1.2.3