[FFmpeg-devel] [PATCH] Use getaddrinfo instead of gethostbyname, if available

Martin Storsjö martin
Fri Jan 1 16:57:20 CET 2010

On Fri, 1 Jan 2010, Reimar D?ffinger wrote:

> AFAICT for any correct implementation this is a very complex way of
> doing
> *sin_addr = ((struct sockaddr_in *)cur->ai_addr)->sin_addr;
> Even if we don't want that,
> > for (cur = ai; cur; cur = cur->ai_next)
> is a bit simpler than the while.

Indeed. Simplified both the loop and the assignment to *sin_addr.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getaddrinfo2.patch
Type: text/x-diff
Size: 1757 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100101/c5f58e0a/attachment.patch>

More information about the ffmpeg-devel mailing list