aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-04-26 18:00:28 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-04-26 18:00:28 +0000
commita33cc9511b968bee9a2e64644b7c17090eb4583d (patch)
tree781e9990b0c6bc74a811ac5f4f3c4d8e6af6d358
parent0913873e5b681a8655396365799b2743924a8902 (diff)
downloadffmpeg-a33cc9511b968bee9a2e64644b7c17090eb4583d.tar.gz
cosmetics in resolve_host
Originally committed as revision 8833 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index a5539be4c4..3f46b791a5 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;
}