Browse Source

cosmetics in resolve_host

Originally committed as revision 8833 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Alex Beregszaszi 18 years ago
parent
commit
a33cc9511b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavformat/tcp.c

+ 2
- 2
libavformat/tcp.c View File

@@ -33,11 +33,11 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname)
{ {
struct hostent *hp; struct hostent *hp;


if ((inet_aton(hostname, sin_addr)) == 0) {
if (!inet_aton(hostname, sin_addr)) {
hp = gethostbyname(hostname); hp = gethostbyname(hostname);
if (!hp) if (!hp)
return -1; return -1;
memcpy (sin_addr, hp->h_addr, sizeof(struct in_addr));
memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr));
} }
return 0; return 0;
} }


Loading…
Cancel
Save