initialize name length before calling getsockname()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-12-27 00:19:37 +00:00
parent 9c26672d4d
commit f16ba4bb7e

View File

@ -255,7 +255,7 @@ void wxSocketImpl::PostCreation()
wxSocketError wxSocketImpl::UpdateLocalAddress()
{
WX_SOCKLEN_T lenAddr;
WX_SOCKLEN_T lenAddr = sizeof(*m_local->m_addr);
if ( getsockname(m_fd, m_local->m_addr, &lenAddr) != 0 )
{
Close();