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() ...@@ -53,13 +53,13 @@ void CTCPStunThread::Reset()
_fListenSocketsOnEpoll = false; _fListenSocketsOnEpoll = false;
memset(&_tsaListen, '\0', sizeof(_tsaListen)); _tsaListen = {};
_fNeedToExit = false; _fNeedToExit = false;
_spAuth.reset(); _spAuth.reset();
_role = RolePP; _role = RolePP;
memset(&_tsa, '\0', sizeof(_tsa)); _tsa = {};
_maxConnections = c_MaxNumberOfConnectionsDefault; _maxConnections = c_MaxNumberOfConnectionsDefault;
......
...@@ -378,8 +378,8 @@ HRESULT CStunRequestHandler::ValidateAuth() ...@@ -378,8 +378,8 @@ HRESULT CStunRequestHandler::ValidateAuth()
return S_OK; // nothing to do if there is no auth mechanism in place return S_OK; // nothing to do if there is no auth mechanism in place
} }
memset(&authattributes, '\0', sizeof(authattributes)); authattributes = {};
memset(&authresponse, '\0', sizeof(authresponse)); authresponse = {};
reader.GetStringAttributeByType(STUN_ATTRIBUTE_USERNAME, authattributes.szUser, ARRAYSIZE(authattributes.szUser)); reader.GetStringAttributeByType(STUN_ATTRIBUTE_USERNAME, authattributes.szUser, ARRAYSIZE(authattributes.szUser));
reader.GetStringAttributeByType(STUN_ATTRIBUTE_REALM, authattributes.szRealm, ARRAYSIZE(authattributes.szRealm)); reader.GetStringAttributeByType(STUN_ATTRIBUTE_REALM, authattributes.szRealm, ARRAYSIZE(authattributes.szRealm));
......
...@@ -45,7 +45,7 @@ HRESULT CStunClientTestBase::Init(StunClientLogicConfig* pConfig, StunClientResu ...@@ -45,7 +45,7 @@ HRESULT CStunClientTestBase::Init(StunClientLogicConfig* pConfig, StunClientResu
_pConfig = pConfig; _pConfig = pConfig;
_pResults = pResults; _pResults = pResults;
_fCompleted = false; _fCompleted = false;
memset(&_transid, 0, sizeof(_transid)); _transid = {};
Cleanup: Cleanup:
return hr; 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