summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/server.cpp2
-rw-r--r--protocols/EmLanProto/src/mlan.cpp16
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/oauth.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/userutils.cpp2
-rw-r--r--protocols/IRCG/src/irclib.cpp2
-rw-r--r--protocols/IRCG/src/ui_utils.cpp4
-rw-r--r--protocols/IcqOscarJ/src/chan_04close.cpp2
-rw-r--r--protocols/IcqOscarJ/src/i18n.cpp12
-rw-r--r--protocols/IcqOscarJ/src/icq_filetransfer.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp6
-rw-r--r--protocols/IcqOscarJ/src/icq_server.cpp2
-rw-r--r--protocols/IcqOscarJ/src/oscar_filetransfer.cpp2
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp2
-rw-r--r--protocols/JabberG/src/jabber.h4
-rw-r--r--protocols/JabberG/src/jabber_archive.cpp10
-rw-r--r--protocols/JabberG/src/jabber_byte.cpp6
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp8
-rw-r--r--protocols/JabberG/src/jabber_presence_manager.h4
-rw-r--r--protocols/JabberG/src/jabber_rc.h2
-rw-r--r--protocols/JabberG/src/jabber_send_manager.h4
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp2
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp2
-rw-r--r--protocols/JabberG/src/ui_utils.cpp4
-rw-r--r--protocols/SkypeClassic/src/contacts.cpp2
-rw-r--r--protocols/SkypeClassic/src/debug.cpp4
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp6
-rw-r--r--protocols/Tlen/src/tlen.cpp4
-rw-r--r--protocols/Tlen/src/tlen_avatar.cpp6
-rw-r--r--protocols/Xfire/src/addgamedialog.cpp2
-rw-r--r--protocols/Xfire/src/main.cpp4
-rw-r--r--protocols/Yahoo/src/file_transfer.cpp2
-rw-r--r--protocols/Yahoo/src/http_gateway.cpp2
35 files changed, 71 insertions, 71 deletions
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp
index 8407f426fd..c2b74f219d 100644
--- a/protocols/AimOscar/src/server.cpp
+++ b/protocols/AimOscar/src/server.cpp
@@ -2267,7 +2267,7 @@ void CAimProto::snac_admin_account_confirm(SNAC &snac)//family 0x0007
char sn[33];
int sn_length=buf[SNAC_SIZE*2];
MCONTACT hContact;
- ZeroMemory(sn,sizeof(sn));
+ memset(sn, 0, sizeof(sn));
memcpy(sn,&buf[SNAC_SIZE*2+1],sn_length);
hContact=find_contact(sn);
if (hContact)
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp
index 39d33a7f91..2e170253ab 100644
--- a/protocols/EmLanProto/src/mlan.cpp
+++ b/protocols/EmLanProto/src/mlan.cpp
@@ -220,7 +220,7 @@ void CMLan::Check()
void CMLan::RequestStatus(bool answer, u_long addr)
{
TPacket pak;
- ZeroMemory(&pak, sizeof(pak));
+ memset(&pak, 0, sizeof(pak));
pak.flReqStatus = answer;
pak.strName = m_name;
SendPacketExt(pak, addr);
@@ -349,7 +349,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from)
pak.flIsUrl ? PSR_URL : PSR_MESSAGE, 0, (LPARAM)&pre );
TPacket npak;
- ZeroMemory(&npak, sizeof(npak));
+ memset(&npak, 0, sizeof(npak));
npak.idAckMessage = pak.idMessage;
npak.flIsUrl = pak.flIsUrl;
SendPacketExt(npak, from.S_un.S_addr);
@@ -408,7 +408,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from)
if (mesAway)
{
TPacket npak;
- ZeroMemory(&npak, sizeof(npak));
+ memset(&npak, 0, sizeof(npak));
npak.idAckAwayMessage = pak.idReqAwayMessage;
npak.strAwayMessage = mesAway;
SendPacketExt(npak, cont->m_addr.S_un.S_addr);
@@ -426,7 +426,7 @@ void CMLan::RecvMessageUrl(CCSDATA* ccs)
DBEVENTINFO dbei;
PROTORECVEVENT *pre=(PROTORECVEVENT*)ccs->lParam;
- ZeroMemory(&dbei,sizeof(dbei));
+ memset(&dbei, 0, sizeof(dbei));
if (!mir_strcmp(ccs->szProtoService, PSR_MESSAGE))
dbei.eventType = EVENTTYPE_MESSAGE;
@@ -576,7 +576,7 @@ void CMLan::SendMessageExt(TDataHolder* hold)
else
{
TPacket pak;
- ZeroMemory(&pak, sizeof(pak));
+ memset(&pak, 0, sizeof(pak));
u_long addr = db_get_dw((MCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
pak.strMessage = hold->msg;
pak.idMessage = hold->id;
@@ -592,7 +592,7 @@ void CMLan::GetAwayMsgExt(TDataHolder* hold)
// TODO: check all other params (offline user, offline protocol)
Sleep(0);
TPacket pak;
- ZeroMemory(&pak, sizeof(pak));
+ memset(&pak, 0, sizeof(pak));
pak.idReqAwayMessage = hold->id;
u_long addr = db_get_dw((MCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
SendPacketExt(pak, addr);
@@ -787,7 +787,7 @@ u_char* CMLan::CreatePacket(TPacket& pak, int* pBufLen)
void CMLan::ParsePacket(TPacket& pak, u_char* buf, int len)
{
- ZeroMemory(&pak, sizeof(pak));
+ memset(&pak, 0, sizeof(pak));
u_char* buf_end = buf+len;
while (*buf && buf<buf_end)
{
@@ -893,7 +893,7 @@ void CMLan::SaveSettings()
CMLan::TFileConnection::TFileConnection()
{
- ZeroMemory(this, sizeof(TFileConnection));
+ memset(this, 0, sizeof(TFileConnection));
InitializeCriticalSection(&m_csAccess);
m_state = FCS_OK;
}
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index e3f871cfdf..f54dda4d3e 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -463,7 +463,7 @@ void __cdecl GGPROTO::setavatarthread(void *param)
httpHeaders[1].szValue = token;
//construct 2nd request
- ZeroMemory(&req, sizeof(req));
+ memset(&req, 0, sizeof(req));
req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = "http://avatars.nowe.gg/upload";
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp
index 6d4749f585..4918700cc8 100644
--- a/protocols/Gadu-Gadu/src/oauth.cpp
+++ b/protocols/Gadu-Gadu/src/oauth.cpp
@@ -349,7 +349,7 @@ int GGPROTO::oauth_receivetoken()
mir_free(str);
str = mir_strdup(szUrl);
- ZeroMemory(&req, sizeof(req));
+ memset(&req, 0, sizeof(req));
req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = szUrl;
@@ -376,7 +376,7 @@ int GGPROTO::oauth_receivetoken()
token = NULL;
token_secret = NULL;
- ZeroMemory(&req, sizeof(req));
+ memset(&req, 0, sizeof(req));
req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.szUrl = szUrl;
diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp
index bbd3e6b01f..88596aeaaf 100644
--- a/protocols/Gadu-Gadu/src/userutils.cpp
+++ b/protocols/Gadu-Gadu/src/userutils.cpp
@@ -275,6 +275,6 @@ void GGPROTO::threadwait(GGTHREAD *thread)
if (!thread->hThread) return;
while (WaitForSingleObjectEx(thread->hThread, INFINITE, TRUE) != WAIT_OBJECT_0);
CloseHandle(thread->hThread);
- ZeroMemory(thread, sizeof(GGTHREAD));
+ memset(thread, 0, sizeof(GGTHREAD));
}
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp
index 3a08e3b817..6ecc46abba 100644
--- a/protocols/IRCG/src/irclib.cpp
+++ b/protocols/IRCG/src/irclib.cpp
@@ -733,7 +733,7 @@ CDccSession::CDccSession(CIrcProto* _pro, DCCINFO* pdci) :
di = pdci; // Setup values passed to the constructor
- ZeroMemory(&pfts, sizeof(PROTOFILETRANSFERSTATUS));
+ memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
if (di->iType == DCC_SEND && di->bSender == false)
diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp
index d1e999f7bc..a72e9b1384 100644
--- a/protocols/IRCG/src/ui_utils.cpp
+++ b/protocols/IRCG/src/ui_utils.cpp
@@ -1351,7 +1351,7 @@ HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const TCHAR *name)
void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi)
{
- ZeroMemory(tvi, sizeof(*tvi));
+ memset(tvi, 0, sizeof(*tvi));
tvi->mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_IMAGE|TVIF_INTEGRAL|TVIF_PARAM|TVIF_SELECTEDIMAGE|TVIF_STATE;
tvi->hItem = hItem;
GetItem(tvi);
@@ -1359,7 +1359,7 @@ void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi)
void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi, TCHAR *szText, int iTextLength)
{
- ZeroMemory(tvi, sizeof(*tvi));
+ memset(tvi, 0, sizeof(*tvi));
tvi->mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_IMAGE|TVIF_INTEGRAL|TVIF_PARAM|TVIF_SELECTEDIMAGE|TVIF_STATE|TVIF_TEXT;
tvi->hItem = hItem;
tvi->pszText = szText;
diff --git a/protocols/IcqOscarJ/src/chan_04close.cpp b/protocols/IcqOscarJ/src/chan_04close.cpp
index 12eef821ba..3c774e5ce0 100644
--- a/protocols/IcqOscarJ/src/chan_04close.cpp
+++ b/protocols/IcqOscarJ/src/chan_04close.cpp
@@ -189,7 +189,7 @@ void CIcqProto::handleSignonError(WORD wError)
case 0x06: // Internal Client error (bad input to authorizer)
case 0x07: // Invalid account
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
- ZeroMemory(m_szPassword, sizeof(m_szPassword));
+ memset(m_szPassword, 0, sizeof(m_szPassword));
icq_LogFatalParam(LPGEN("Connection failed.\nYour ICQ number or password was rejected (%d)."), wError);
break;
diff --git a/protocols/IcqOscarJ/src/i18n.cpp b/protocols/IcqOscarJ/src/i18n.cpp
index 5f2c1f4f2a..5b7ab1d2a2 100644
--- a/protocols/IcqOscarJ/src/i18n.cpp
+++ b/protocols/IcqOscarJ/src/i18n.cpp
@@ -273,7 +273,7 @@ int __stdcall utf8_encode(const char *from, char **to)
}
WCHAR *unicode = (WCHAR*)_alloca((wchars + 1) * sizeof(WCHAR));
- ZeroMemory(unicode, (wchars + 1) * sizeof(WCHAR));
+ memset(unicode, 0, ((wchars + 1) * sizeof(WCHAR)));
int err = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, from, (int)mir_strlen(from), unicode, wchars);
if (err != wchars) {
@@ -308,7 +308,7 @@ char* __stdcall ansi_to_utf8_codepage(const char *ansi, WORD wCp)
{
size_t wchars = mir_strlen(ansi);
WCHAR *unicode = (WCHAR*)_alloca((wchars + 1) * sizeof(WCHAR));
- ZeroMemory(unicode, (wchars + 1) * sizeof(WCHAR));
+ memset(unicode, 0, ((wchars + 1) * sizeof(WCHAR)));
MultiByteToWideChar(wCp, MB_PRECOMPOSED, ansi, (int)wchars, unicode, (int)wchars);
@@ -331,7 +331,7 @@ int __stdcall utf8_decode_codepage(const char *from, char **to, WORD wCp)
if (bHasCP_UTF8) {
size_t inlen = mir_strlen(from) + 1;
WCHAR *wszTemp = (WCHAR *)_alloca(inlen * sizeof(WCHAR));
- ZeroMemory(wszTemp, inlen * sizeof(WCHAR));
+ memset(wszTemp, 0, (inlen * sizeof(WCHAR)));
// Convert the UTF-8 string to UCS
if (MultiByteToWideChar(CP_UTF8, 0, from, -1, wszTemp, (int)inlen)) {
@@ -402,13 +402,13 @@ int __stdcall utf8_decode_static(const char *from, char *to, size_t to_size)
return 0;
// Clear target
- ZeroMemory(to, to_size);
+ memset(to, 0, to_size);
// Use the native conversion routines when available
if (bHasCP_UTF8) {
size_t inlen = mir_strlen(from) + 1;
WCHAR *wszTemp = (WCHAR*)_alloca(inlen * sizeof(WCHAR));
- ZeroMemory(wszTemp, inlen * sizeof(WCHAR));
+ memset(wszTemp, 0, (inlen * sizeof(WCHAR)));
// Convert the UTF-8 string to UCS
if (MultiByteToWideChar(CP_UTF8, 0, from, -1, wszTemp, (int)inlen)) {
@@ -460,7 +460,7 @@ WCHAR* __stdcall ansi_to_unicode(const char *ansi)
char* __stdcall unicode_to_ansi_static(const WCHAR *unicode, char *ansi, size_t ansi_size)
{
- ZeroMemory(ansi, ansi_size);
+ memset(ansi, 0, ansi_size);
if (WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, unicode, (int)mir_wstrlen(unicode), ansi, (int)ansi_size, NULL, NULL) > 1)
return ansi;
diff --git a/protocols/IcqOscarJ/src/icq_filetransfer.cpp b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
index 32df7bae33..6afa3fef6f 100644
--- a/protocols/IcqOscarJ/src/icq_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/icq_filetransfer.cpp
@@ -27,7 +27,7 @@
static void file_buildProtoFileTransferStatus(filetransfer* ft, PROTOFILETRANSFERSTATUS* pfts)
{
- ZeroMemory(pfts, sizeof(PROTOFILETRANSFERSTATUS));
+ memset(pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts->cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts->hContact = ft->hContact;
pfts->flags = PFTS_UTF | (ft->sending ? PFTS_SENDING : PFTS_RECEIVING); /* Standard FT is Ansi only */
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 2e4f3045de..158f76ffc6 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -93,7 +93,7 @@ CIcqProto::CIcqProto(const char* aProtoName, const TCHAR* aUserName) :
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CIcqProto::ServListCListGroupChange);
// Initialize status message struct
- ZeroMemory(&m_modeMsgs, sizeof(icq_mode_messages));
+ memset(&m_modeMsgs, 0, sizeof(icq_mode_messages));
m_modeMsgsMutex = new icq_critical_section();
connectionHandleMutex = new icq_critical_section();
localSeqMutex = new icq_critical_section();
@@ -1023,7 +1023,7 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int flags, int nContacts,
// This is kinda messy, but there is no simple way to do it. First
// we need to calculate the length of the packet.
contacts = (struct icq_contactsend_s*)_alloca(sizeof(struct icq_contactsend_s)*nContacts);
- ZeroMemory(contacts, sizeof(struct icq_contactsend_s)*nContacts);
+ memset(contacts, 0, (sizeof(struct icq_contactsend_s) * nContacts));
size_t nDataLen = 0, nNamesLen = 0;
for (i = 0; i < nContacts; i++) {
@@ -1138,7 +1138,7 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int flags, int nContacts,
// This is kinda messy, but there is no simple way to do it. First
// we need to calculate the length of the packet.
contacts = (struct icq_contactsend_s*)_alloca(sizeof(struct icq_contactsend_s)*nContacts);
- ZeroMemory(contacts, sizeof(struct icq_contactsend_s)*nContacts);
+ memset(contacts, 0, (sizeof(struct icq_contactsend_s) * nContacts));
{
size_t nBodyLength = 0;
for (i = 0; i < nContacts; i++) {
diff --git a/protocols/IcqOscarJ/src/icq_server.cpp b/protocols/IcqOscarJ/src/icq_server.cpp
index 94356f5602..5ea930f0b7 100644
--- a/protocols/IcqOscarJ/src/icq_server.cpp
+++ b/protocols/IcqOscarJ/src/icq_server.cpp
@@ -110,7 +110,7 @@ void __cdecl CIcqProto::ServerThread(serverthread_start_info *infoParam)
while (serverThreadHandle) {
if (info.bReinitRecver) { // we reconnected, reinit struct
info.bReinitRecver = false;
- ZeroMemory(&packetRecv, sizeof(packetRecv));
+ memset(&packetRecv, 0, sizeof(packetRecv));
packetRecv.cbSize = sizeof(packetRecv);
packetRecv.dwTimeout = 1000;
}
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
index c656024087..ade1819f0b 100644
--- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
+++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp
@@ -1031,7 +1031,7 @@ void CIcqProto::oftFileResume(oscar_filetransfer *ft, int action, const TCHAR *s
static void oft_buildProtoFileTransferStatus(oscar_filetransfer* ft, PROTOFILETRANSFERSTATUS* pfts)
{
- ZeroMemory(pfts, sizeof(PROTOFILETRANSFERSTATUS));
+ memset(pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts->cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts->hContact = ft->hContact;
pfts->flags = PFTS_UTF + ((ft->flags & OFTF_SENDING) ? PFTS_SENDING : PFTS_RECEIVING);
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index 32e8baa7c8..b452758539 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -1397,7 +1397,7 @@ void* __fastcall SAFE_MALLOC(size_t size)
if (size) {
p = malloc(size);
if (p)
- ZeroMemory(p, size);
+ memset(p, 0, size);
}
return p;
}
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h
index 7e20519a89..9b24a941d7 100644
--- a/protocols/JabberG/src/jabber.h
+++ b/protocols/JabberG/src/jabber.h
@@ -292,7 +292,7 @@ struct CJabberHttpAuthParams
TCHAR *m_szUrl;
CJabberHttpAuthParams()
{
- ZeroMemory(this, sizeof(CJabberHttpAuthParams));
+ memset(this, 0, sizeof(CJabberHttpAuthParams));
}
~CJabberHttpAuthParams()
{
@@ -306,7 +306,7 @@ struct CJabberHttpAuthParams
mir_free(m_szId);
mir_free(m_szMethod);
mir_free(m_szUrl);
- ZeroMemory(this, sizeof(CJabberHttpAuthParams));
+ memset(this, 0, sizeof(CJabberHttpAuthParams));
}
};
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp
index 72be7ad08d..40cb7df0f8 100644
--- a/protocols/JabberG/src/jabber_archive.cpp
+++ b/protocols/JabberG/src/jabber_archive.cpp
@@ -130,7 +130,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
if (!(hExistingDbEvent = db_event_first(hContact)))
return FALSE;
- ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ memset(&dbeiExisting, 0, sizeof(dbeiExisting));
dbeiExisting.cbSize = sizeof(dbeiExisting);
db_event_get(hExistingDbEvent, &dbeiExisting);
dwEventTimeStamp = dbeiExisting.timestamp;
@@ -148,7 +148,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
// check for equal timestamps
if (dbei.timestamp == dwPreviousTimeStamp) {
- ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ memset(&dbeiExisting, 0, sizeof(dbeiExisting));
dbeiExisting.cbSize = sizeof(dbeiExisting);
db_event_get(hPreviousDbEvent, &dbeiExisting);
@@ -161,7 +161,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
// find event with another timestamp
hExistingDbEvent = db_event_next(hContact, hPreviousDbEvent);
while (hExistingDbEvent != NULL) {
- ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ memset(&dbeiExisting, 0, sizeof(dbeiExisting));
dbeiExisting.cbSize = sizeof(dbeiExisting);
db_event_get(hExistingDbEvent, &dbeiExisting);
@@ -182,7 +182,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
if (dbei.timestamp <= dwPreviousTimeStamp) {
// look back
while (hExistingDbEvent != NULL) {
- ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ memset(&dbeiExisting, 0, sizeof(dbeiExisting));
dbeiExisting.cbSize = sizeof(dbeiExisting);
db_event_get(hExistingDbEvent, &dbeiExisting);
@@ -212,7 +212,7 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
else {
// look forward
while (hExistingDbEvent != NULL) {
- ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ memset(&dbeiExisting, 0, sizeof(dbeiExisting));
dbeiExisting.cbSize = sizeof(dbeiExisting);
db_event_get(hExistingDbEvent, &dbeiExisting);
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp
index 52fd10c3f0..beddbee510 100644
--- a/protocols/JabberG/src/jabber_byte.cpp
+++ b/protocols/JabberG/src/jabber_byte.cpp
@@ -374,7 +374,7 @@ int CJabberProto::ByteSendParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char* b
for (i=0; i<40 && buffer[i+5]==str[i]; i++);
mir_free(str);
- ZeroMemory(data, 10);
+ memset(data, 0, sizeof(data));
data[1] = (i>=20)?0:2;
data[0] = 5;
data[3] = 1;
@@ -506,7 +506,7 @@ int CJabberProto::ByteSendProxyParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, ch
// 45-46 dst.port (0)
if (datalen == 2 && buffer[0] == 5 && buffer[1] == 0) {
BYTE data[47];
- ZeroMemory(data, sizeof(data));
+ memset(data, 0, sizeof(data));
*((DWORD*)data) = 0x03000105;
data[4] = 40;
@@ -701,7 +701,7 @@ int CJabberProto::ByteReceiveParse(HANDLE hConn, JABBER_BYTE_TRANSFER *jbt, char
// 45-46 dst.port (0)
if (datalen == 2 && buffer[0] == 5 && buffer[1] == 0) {
BYTE data[47];
- ZeroMemory(data, sizeof(data));
+ memset(data, 0, sizeof(data));
*((DWORD*)data) = 0x03000105;
data[4] = 40;
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index bfb4bc8a76..73e75d5faf 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -996,7 +996,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
lvhti.pt.x = rcCtl.left + 5;
lvhti.pt.y = rcHdr.bottom + 5;
int iFirst = ListView_HitTest(hwndList, &lvhti);
- ZeroMemory(&lvhti, sizeof(lvhti));
+ memset(&lvhti, 0, sizeof(lvhti));
lvhti.pt.x = rcCtl.left + 5;
lvhti.pt.y = rcCtl.bottom - 5;
int iLast = ListView_HitTest(hwndList, &lvhti);
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp
index 24db2e9e5f..e221abd5b1 100644
--- a/protocols/JabberG/src/jabber_ft.cpp
+++ b/protocols/JabberG/src/jabber_ft.cpp
@@ -143,7 +143,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo)
if ((bDirect || bProxy) && !_tcscmp(xmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
// Start Bytestream session
JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER;
- ZeroMemory(jbt, sizeof(JABBER_BYTE_TRANSFER));
+ memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER));
jbt->srcJID = mir_tstrdup(pInfo->m_szTo);
jbt->dstJID = mir_tstrdup(pInfo->m_szFrom);
jbt->sid = mir_tstrdup(ft->sid);
@@ -156,7 +156,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo)
}
else if (!_tcscmp(xmlGetText(valueNode), JABBER_FEAT_IBB)) {
JABBER_IBB_TRANSFER *jibb = (JABBER_IBB_TRANSFER *) mir_alloc(sizeof (JABBER_IBB_TRANSFER));
- ZeroMemory(jibb, sizeof(JABBER_IBB_TRANSFER));
+ memset(jibb, 0, sizeof(JABBER_IBB_TRANSFER));
jibb->srcJID = mir_tstrdup(pInfo->m_szTo);
jibb->dstJID = mir_tstrdup(pInfo->m_szFrom);
jibb->sid = mir_tstrdup(ft->sid);
@@ -434,7 +434,7 @@ BOOL CJabberProto::FtHandleBytestreamRequest(HXML iqNode, CJabberIqInfo *pInfo)
if ((sid = xmlGetAttrValue(queryNode, _T("sid"))) != NULL && (item = ListGetItemPtr(LIST_FTRECV, sid)) != NULL) {
// Start Bytestream session
JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER;
- ZeroMemory(jbt, sizeof(JABBER_BYTE_TRANSFER));
+ memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER));
jbt->iqNode = xi.copyNode(iqNode);
jbt->pfnRecv = &CJabberProto::FtReceive;
jbt->pfnFinal = &CJabberProto::FtReceiveFinal;
@@ -478,7 +478,7 @@ BOOL CJabberProto::FtHandleIbbRequest(HXML iqNode, BOOL bOpen)
if (bOpen) {
if (!item->jibb) {
JABBER_IBB_TRANSFER *jibb = (JABBER_IBB_TRANSFER *) mir_alloc(sizeof(JABBER_IBB_TRANSFER));
- ZeroMemory(jibb, sizeof(JABBER_IBB_TRANSFER));
+ memset(jibb, 0, sizeof(JABBER_IBB_TRANSFER));
jibb->srcJID = mir_tstrdup(from);
jibb->dstJID = mir_tstrdup(to);
jibb->sid = mir_tstrdup(sid);
diff --git a/protocols/JabberG/src/jabber_presence_manager.h b/protocols/JabberG/src/jabber_presence_manager.h
index 9b33288192..93a0c2757f 100644
--- a/protocols/JabberG/src/jabber_presence_manager.h
+++ b/protocols/JabberG/src/jabber_presence_manager.h
@@ -49,7 +49,7 @@ public:
CJabberPresenceInfo()
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
}
~CJabberPresenceInfo()
{
@@ -72,7 +72,7 @@ class CJabberPresencePermanentInfo
public:
CJabberPresencePermanentInfo()
{
- ZeroMemory(this, sizeof(CJabberPresencePermanentInfo));
+ memset(this, 0, sizeof(CJabberPresencePermanentInfo));
}
~CJabberPresencePermanentInfo()
diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h
index 806b42839f..86cd472cc5 100644
--- a/protocols/JabberG/src/jabber_rc.h
+++ b/protocols/JabberG/src/jabber_rc.h
@@ -111,7 +111,7 @@ protected:
public:
CJabberAdhocNode(CJabberProto* pProto, TCHAR* szJid, TCHAR* szNode, TCHAR* szName, JABBER_ADHOC_HANDLER pHandler)
{
- ZeroMemory(this, sizeof(CJabberAdhocNode));
+ memset(this, 0, sizeof(CJabberAdhocNode));
replaceStrT(m_szJid, szJid);
replaceStrT(m_szNode, szNode);
replaceStrT(m_szName, szName);
diff --git a/protocols/JabberG/src/jabber_send_manager.h b/protocols/JabberG/src/jabber_send_manager.h
index 375b279b05..75e23956b4 100644
--- a/protocols/JabberG/src/jabber_send_manager.h
+++ b/protocols/JabberG/src/jabber_send_manager.h
@@ -49,7 +49,7 @@ public:
CJabberSendInfo()
{
- ZeroMemory(this, sizeof(*this));
+ memset(this, 0, sizeof(*this));
}
~CJabberSendInfo()
{
@@ -73,7 +73,7 @@ class CJabberSendPermanentInfo
public:
CJabberSendPermanentInfo()
{
- ZeroMemory(this, sizeof(CJabberSendPermanentInfo));
+ memset(this, 0, sizeof(CJabberSendPermanentInfo));
}
~CJabberSendPermanentInfo()
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index e214f6dbe1..b2dd0a460a 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1174,7 +1174,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
if (!pParams)
return;
- ZeroMemory(pParams, sizeof(CJabberHttpAuthParams));
+ memset(pParams, 0, sizeof(CJabberHttpAuthParams));
pParams->m_nType = CJabberHttpAuthParams::MSG;
pParams->m_szFrom = mir_tstrdup(from);
LPCTSTR ptszThread = xmlGetText(xmlGetChild(node, "thread"));
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index dad25263b6..a6a550ea7f 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -441,7 +441,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS));
dat = (JabberUserInfoDlgData *)mir_alloc(sizeof(JabberUserInfoDlgData));
- ZeroMemory(dat, sizeof(JabberUserInfoDlgData));
+ memset(dat, 0, sizeof(JabberUserInfoDlgData));
dat->resourcesCount = -1;
if (CallService(MS_DB_CONTACT_IS, (WPARAM)lParam, 0))
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 58f55518cd..0dcbfca763 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -1205,7 +1205,7 @@ void CJabberProto::SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR s
TCHAR *szListeningTo;
if (ServiceExists(MS_LISTENINGTO_GETPARSEDTEXT)) {
LISTENINGTOINFO li;
- ZeroMemory(&li, sizeof(li));
+ memset(&li, 0, sizeof(li));
li.cbSize = sizeof(li);
li.dwFlags = LTI_TCHAR;
li.ptszArtist = (TCHAR*)szArtist;
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp
index 9718015fdf..f20062aff5 100644
--- a/protocols/JabberG/src/ui_utils.cpp
+++ b/protocols/JabberG/src/ui_utils.cpp
@@ -1643,7 +1643,7 @@ HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const TCHAR *name)
void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi)
{
- ZeroMemory(tvi, sizeof(*tvi));
+ memset(tvi, 0, sizeof(*tvi));
tvi->mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_IMAGE|TVIF_INTEGRAL|TVIF_PARAM|TVIF_SELECTEDIMAGE|TVIF_STATE;
tvi->hItem = hItem;
GetItem(tvi);
@@ -1651,7 +1651,7 @@ void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi)
void CCtrlTreeView::GetItem(HTREEITEM hItem, TVITEMEX *tvi, TCHAR *szText, int iTextLength)
{
- ZeroMemory(tvi, sizeof(*tvi));
+ memset(tvi, 0, sizeof(*tvi));
tvi->mask = TVIF_CHILDREN|TVIF_HANDLE|TVIF_IMAGE|TVIF_INTEGRAL|TVIF_PARAM|TVIF_SELECTEDIMAGE|TVIF_STATE|TVIF_TEXT;
tvi->hItem = hItem;
tvi->pszText = szText;
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp
index 7a24ed7f70..1e94deb493 100644
--- a/protocols/SkypeClassic/src/contacts.cpp
+++ b/protocols/SkypeClassic/src/contacts.cpp
@@ -182,7 +182,7 @@ HANDLE add_contextmenu(MCONTACT) {
mi = BlockContactItem();
hMenuBlockContactItem = Menu_AddContactMenuItem(&mi);
- ZeroMemory(&mi, sizeof(mi));
+ memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = -2000005000;
mi.flags = CMIF_TCHAR;
diff --git a/protocols/SkypeClassic/src/debug.cpp b/protocols/SkypeClassic/src/debug.cpp
index beb19c6db6..4e7f7fd7b7 100644
--- a/protocols/SkypeClassic/src/debug.cpp
+++ b/protocols/SkypeClassic/src/debug.cpp
@@ -26,8 +26,8 @@ void init_debug(void) {
char *p;
char logfile[MAX_PATH];
- ZeroMemory(logfile, sizeof(logfile));
- p=logfile+GetModuleFileNameA(NULL, logfile, sizeof(logfile));
+ memset(logfile, 0, sizeof(logfile));
+ p=logfile+GetModuleFileNameA(NULL, logfile, SIZEOF(logfile));
if (!(p=strrchr (logfile, '\\'))) p=logfile; else p++;
sprintf (p, "%s_log.txt", SKYPE_PROTONAME);
m_szLogBuf = (char*)calloc (1, (m_iBufSize = INITBUF));
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp
index 3caea3d09f..246e3403a2 100644
--- a/protocols/SkypeClassic/src/skypeopt.cpp
+++ b/protocols/SkypeClassic/src/skypeopt.cpp
@@ -51,7 +51,7 @@ extern BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD);
int RegisterOptions(WPARAM wParam, LPARAM) {
OPTIONSDIALOGPAGE odp;
- ZeroMemory(&odp, sizeof(odp));
+ memset(&odp, 0, sizeof(odp));
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
@@ -401,7 +401,7 @@ INT_PTR CALLBACK OptionsProxyDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA
db_set_w(NULL, SKYPE_PROTONAME, "Port", (unsigned short)GetDlgItemInt(hwndDlg, IDC_PORT, NULL, FALSE));
db_set_b(NULL, SKYPE_PROTONAME, "RequiresPassword", (BYTE)(SendMessage(GetDlgItem(hwndDlg, IDC_REQPASS), BM_GETCHECK,0,0)));
db_set_b (NULL, SKYPE_PROTONAME, "UseSkype2Socket", (BYTE)(SendMessage(GetDlgItem(hwndDlg, IDC_USES2S), BM_GETCHECK,0,0)));
- ZeroMemory(buf, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, buf, SIZEOF(buf));
db_set_s(NULL, SKYPE_PROTONAME, "Password", buf);
return TRUE;
@@ -853,7 +853,7 @@ INT_PTR CALLBACK DetailsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
case WM_INITDIALOG:
TranslateDialogDefault( hwndDlg );
- ZeroMemory (&myProfile, sizeof(myProfile));
+ memset(&myProfile, 0, sizeof(myProfile));
SkypeProfile_Load(&myProfile);
if(SkypeInitialized)
SkypeProfile_LoadFromSkype(&myProfile);
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 9897d5b873..a872d20484 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -187,12 +187,12 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM wParam, LPARAM lParam)
else if (threadData != NULL && strlen(threadData->password) > 0)
password = mir_strdup(threadData->password);
- ZeroMemory(&cookie, sizeof(cookie));
+ memset(&cookie, 0, sizeof(cookie));
if (login != NULL && password != NULL) {
mir_snprintf( form, SIZEOF(form), "username=%s&password=%s", login, password);
headers[0].szName = "Content-Type";
headers[0].szValue = "application/x-www-form-urlencoded";
- ZeroMemory(&req, sizeof(req));
+ memset(&req, 0, sizeof(req));
req.cbSize = sizeof(req);
req.requestType = REQUEST_POST;
req.flags = 0;
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp
index 6d468591bf..2d00b0a5a7 100644
--- a/protocols/Tlen/src/tlen_avatar.cpp
+++ b/protocols/Tlen/src/tlen_avatar.cpp
@@ -252,7 +252,7 @@ static void TlenGetAvatarThread(void *ptr) {
item->newAvatarDownloading = TRUE;
}
request = replaceTokens(data->proto->threadData->tlenConfig.mailBase, data->proto->threadData->tlenConfig.avatarGet, login, data->proto->threadData->avatarToken, 0, 0);
- ZeroMemory(&req, sizeof(req));
+ memset(&req, 0, sizeof(req));
req.cbSize = sizeof(req);
req.requestType = data->proto->threadData->tlenConfig.avatarGetMthd;
req.flags = 0;
@@ -391,7 +391,7 @@ void TlenRemoveAvatar(TlenProtocol *proto) {
data->proto =proto;
data->req = req;
request = replaceTokens(proto->threadData->tlenConfig.mailBase, proto->threadData->tlenConfig.avatarRemove, "", proto->threadData->avatarToken, 0, 0);
- ZeroMemory(req, sizeof(NETLIBHTTPREQUEST));
+ memset(req, 0, sizeof(NETLIBHTTPREQUEST));
req->cbSize = sizeof(NETLIBHTTPREQUEST);
req->requestType = proto->threadData->tlenConfig.avatarGetMthd;
req->szUrl = request;
@@ -415,7 +415,7 @@ void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int
threadData->proto = proto;
req = (NETLIBHTTPREQUEST *)mir_alloc(sizeof(NETLIBHTTPREQUEST));
headers = (NETLIBHTTPHEADER *)mir_alloc(sizeof(NETLIBHTTPHEADER));
- ZeroMemory(req, sizeof(NETLIBHTTPREQUEST));
+ memset(req, 0, sizeof(NETLIBHTTPREQUEST));
req->cbSize = sizeof(NETLIBHTTPREQUEST);
req->requestType = proto->threadData->tlenConfig.avatarUploadMthd;
req->szUrl = request;
diff --git a/protocols/Xfire/src/addgamedialog.cpp b/protocols/Xfire/src/addgamedialog.cpp
index 8791aa76e3..be2fae8617 100644
--- a/protocols/Xfire/src/addgamedialog.cpp
+++ b/protocols/Xfire/src/addgamedialog.cpp
@@ -271,7 +271,7 @@ BOOL OpenFileDialog(HWND hwndDlg, OPENFILENAMEA*ofn, char*exe) {
for (unsigned int i = 0; i < sizeFilter; i++)
if (szFilter[i] == '|') szFilter[i] = 0;
//openfiledia vorbereiten
- ZeroMemory(ofn, sizeof(OPENFILENAMEA));
+ memset(ofn, 0, sizeof(OPENFILENAMEA));
ofn->lStructSize = sizeof(OPENFILENAMEA);
ofn->hwndOwner = hwndDlg;
ofn->lpstrFile = szFile;
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp
index 723431b1d4..748e007aaa 100644
--- a/protocols/Xfire/src/main.cpp
+++ b/protocols/Xfire/src/main.cpp
@@ -381,7 +381,7 @@ void XFireClient::receivedPacket(XFirePacket *packet) {
case XFIRE_FOUNDBUDDYS_ID:
{
PROTOSEARCHRESULT psr;
- ZeroMemory(&psr, sizeof(psr));
+ memset(&psr, 0, sizeof(psr));
psr.cbSize = sizeof(psr);
psr.flags = PSR_TCHAR;
@@ -888,7 +888,7 @@ static int OnSystemModulesLoaded(WPARAM wParam, LPARAM lParam)
{
/*NETLIB***********************************/
NETLIBUSER nlu;
- ZeroMemory(&nlu, sizeof(nlu));
+ memset(&nlu, 0, sizeof(nlu));
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS;
nlu.szSettingsModule = protocolname;
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp
index 16327f356c..c73b469548 100644
--- a/protocols/Yahoo/src/file_transfer.cpp
+++ b/protocols/Yahoo/src/file_transfer.cpp
@@ -483,7 +483,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url,
hContact = add_buddy(who, who, 0 /* NO FT for other IMs */, PALF_TEMPORARY);
char fn[1024];
- ZeroMemory(fn, 1024);
+ memset(fn, 0, sizeof(fn));
if (fname != NULL)
mir_strncpy(fn, fname, 1024);
diff --git a/protocols/Yahoo/src/http_gateway.cpp b/protocols/Yahoo/src/http_gateway.cpp
index bbdc47c861..bace76d247 100644
--- a/protocols/Yahoo/src/http_gateway.cpp
+++ b/protocols/Yahoo/src/http_gateway.cpp
@@ -21,7 +21,7 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE
debugLogA("YAHOO_httpGatewayInit!!!");
- ZeroMemory(&nlhpi, sizeof(nlhpi));
+ memset(&nlhpi, 0, sizeof(nlhpi));
nlhpi.cbSize = sizeof(nlhpi);
nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";