Commit 5accc692 authored by John Selbie's avatar John Selbie

Replace memset with curly brace initialization

parent a864e40c
......@@ -53,13 +53,13 @@ void CTCPStunThread::Reset()
_fListenSocketsOnEpoll = false;
memset(&_tsaListen, '\0', sizeof(_tsaListen));
_tsaListen = {};
_fNeedToExit = false;
_spAuth.reset();
_role = RolePP;
memset(&_tsa, '\0', sizeof(_tsa));
_tsa = {};
_maxConnections = c_MaxNumberOfConnectionsDefault;
......
......@@ -378,8 +378,8 @@ HRESULT CStunRequestHandler::ValidateAuth()
return S_OK; // nothing to do if there is no auth mechanism in place
}
memset(&authattributes, '\0', sizeof(authattributes));
memset(&authresponse, '\0', sizeof(authresponse));
authattributes = {};
authresponse = {};
reader.GetStringAttributeByType(STUN_ATTRIBUTE_USERNAME, authattributes.szUser, ARRAYSIZE(authattributes.szUser));
reader.GetStringAttributeByType(STUN_ATTRIBUTE_REALM, authattributes.szRealm, ARRAYSIZE(authattributes.szRealm));
......
......@@ -45,7 +45,7 @@ HRESULT CStunClientTestBase::Init(StunClientLogicConfig* pConfig, StunClientResu
_pConfig = pConfig;
_pResults = pResults;
_fCompleted = false;
memset(&_transid, 0, sizeof(_transid));
_transid = {};
Cleanup:
return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment