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 --- protocols/EmLanProto/src/mlan.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/EmLanProto/src/mlan.cpp') 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