From: Roy Marples Date: Mon, 21 Jan 2008 15:10:46 +0000 (+0000) Subject: inet_aton returns 1 for success X-Git-Tag: v3.2.3~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02945958901892924cc83eb2042cfcd8499862bb;p=thirdparty%2Fdhcpcd.git inet_aton returns 1 for success --- diff --git a/configure.c b/configure.c index b0944182..54c733d1 100644 --- a/configure.c +++ b/configure.c @@ -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--;