WINSOCK: fix WSAStringToAddress

Hans Leidekker hans at it.vu.nl
Fri Aug 26 08:38:48 CDT 2005


I found that our WSAStringToAddress can't translate the address
255.255.255.255. From 'man inet_addr':

 If the input is invalid, INADDR_NONE (usually -1) is returned.
 This is an obsolete interface to inet_aton, described immediately
 above; it is obsolete because -1 is a valid address (255.255.255.255),
 and inet_aton provides a cleaner way to indicate error return.

Patch below uses inet_aton instead and extends the tests to catch
this case.

 -Hans

Changelog
  Avoid using the obsolete inet_addr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winsock_01.diff
Type: text/x-diff
Size: 4395 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050826/bdb5439a/winsock_01.bin


More information about the wine-patches mailing list