changeset 2049:b6b8a9836cf9 libavformat

cosmetics in resolve_host
author alex
date Thu, 26 Apr 2007 18:00:28 +0000
parents 5b54f43626d0
children 612d19cb9550
files tcp.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tcp.c	Thu Apr 26 17:38:30 2007 +0000
+++ b/tcp.c	Thu Apr 26 18:00:28 2007 +0000
@@ -33,11 +33,11 @@
 {
     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;
 }