]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
inet_aton returns 1 for success
authorRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 15:10:46 +0000 (15:10 +0000)
committerRoy Marples <roy@marples.name>
Mon, 21 Jan 2008 15:10:46 +0000 (15:10 +0000)
configure.c

index b0944182acc105c8829c42dc36fda69f4c561594..54c733d115fd7a214cde240d4fc451cfddc95a94 100644 (file)
@@ -256,7 +256,7 @@ static int _make_ntp (const char *file, const char *ifname, const dhcp_t *dhcp)
        } else {
                while (tomatch != 0 && (line = getline (f))) {
                        struct in_addr addr;
-                       
+
                        a = line;
                        token = strsep (&a, " ");
                        if (! token || strcmp (token, "server") != 0)
@@ -265,7 +265,7 @@ static int _make_ntp (const char *file, const char *ifname, const dhcp_t *dhcp)
                        if ((token = strsep (&a, " \n")) == NULL)
                                goto next;
 
-                       if (inet_aton (token, &addr) == 0 &&
+                       if (inet_aton (token, &addr) == 1 &&
                            in_addresses (dhcp->ntpservers, addr))
                                tomatch--;