From a33cc9511b968bee9a2e64644b7c17090eb4583d Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 26 Apr 2007 18:00:28 +0000 Subject: [PATCH] cosmetics in resolve_host Originally committed as revision 8833 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tcp.c b/libavformat/tcp.c index a5539be4c..3f46b791a 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -33,11 +33,11 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname) { struct hostent *hp; - if ((inet_aton(hostname, sin_addr)) == 0) { + if (!inet_aton(hostname, sin_addr)) { hp = gethostbyname(hostname); if (!hp) return -1; - memcpy (sin_addr, hp->h_addr, sizeof(struct in_addr)); + memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr)); } return 0; } -- 2.11.0