]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gsocket.c
Removal of previous wxValidtor code for wxOS2
[wxWidgets.git] / src / msw / gsocket.c
index 88e8c99a5ce083e9023d12a341330bdf9f27337b..0a0f072e7c259fe107b7e11a87519f0f2e1f4d59 100644 (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,11 +1172,10 @@ 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;
-  ((struct sockaddr_in *)address->m_addr)->sin_addr.s_addr = INADDR_ANY;
+  ((struct sockaddr_in *)address->m_addr)->sin_addr.s_addr = INADDR_NONE;
 
   return GSOCK_NOERROR;
 }