Commit b2f2fc5a authored by alex's avatar alex

cosmetics in resolve_host

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8833 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2ab7897a
...@@ -33,11 +33,11 @@ int resolve_host(struct in_addr *sin_addr, const char *hostname) ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment