Stupid bug in GAddress initialization prevented BCC to work. (I still

wonder how this could work with other compilers :-( ...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guillermo Rodriguez Garcia 1999-10-27 10:44:40 +00:00
parent 25f4712757
commit e22da5d625

View File

@ -1164,6 +1164,7 @@ GSocketError _GAddress_translate_to(GAddress *address,
GSocketError _GAddress_Init_INET(GAddress *address)
{
address->m_len = sizeof(struct sockaddr_in);
address->m_addr = (struct sockaddr *) malloc(address->m_len);
if (address->m_addr == NULL)
{
@ -1171,7 +1172,6 @@ GSocketError _GAddress_Init_INET(GAddress *address)
return GSOCK_MEMERR;
}
address->m_len = sizeof(struct sockaddr_in);
address->m_family = GSOCK_INET;
address->m_realfamily = PF_INET;
((struct sockaddr_in *)address->m_addr)->sin_family = AF_INET;