ws2_32: Use the routing table information for gethostbyname('self') if the magic IP would otherwise be returned.

Erich Hoover ehoover at mines.edu
Sat Oct 10 17:09:24 CDT 2009


On Sat, Oct 10, 2009 at 2:52 PM, Vitaliy Margolen
<wine-devel at kievinfo.com>wrote:

> ...
> Why do you return a list of IP addresses from WS2_get_local_ips if you need
> only one? Just get the one with the lowest metric and return it.
> ...
>

Well, most applications only check for the first returned IP (the one with
the highest priority, or the lowest metric).  However, from reading the
knowledge base article the purpose of this "feature" of the routine is to
return them all.

...
> Here and everywhere else please put space before comas to follow the file's
> formatting.
>

Sorry, I copied what I saw for HeapAlloc in the WS_gethostbyname routine
(nearby).  Would you like a patch for updates to the spacing there as well?

...
> You do not need to check pointers for NULL before freeing them.
>

Sorry, when I see "the behavior is undefined" in documentation I tend to shy
away doing something.

Thanks for the feedback!

ehoover at mines.edu
Erich Hoover
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20091010/0b10cd39/attachment-0001.htm>


More information about the wine-devel mailing list