diff options
-rw-r--r-- | usr.sbin/ntpd/server.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index 6165f756c6e..2a88d9c2a85 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.19 2004/12/08 15:47:38 mickey Exp $ */ +/* $OpenBSD: server.c,v 1.20 2004/12/22 05:36:11 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -32,16 +32,16 @@ int setup_listeners(struct servent *se, struct ntpd_conf *conf, u_int *cnt) { struct listen_addr *la; - struct ifaddrs *ifap; + struct ifaddrs *ifa, *ifap; struct sockaddr *sa; u_int new_cnt = 0; int tos = IPTOS_LOWDELAY; if (conf->listen_all) { - if (getifaddrs(&ifap) == -1) + if (getifaddrs(&ifa) == -1) fatal("getifaddrs"); - for (; ifap != NULL; ifap = ifap->ifa_next) { + for (ifap = ifa; ifap != NULL; ifap = ifap->ifa_next) { sa = ifap->ifa_addr; if (sa->sa_family != AF_INET && @@ -56,7 +56,7 @@ setup_listeners(struct servent *se, struct ntpd_conf *conf, u_int *cnt) TAILQ_INSERT_TAIL(&conf->listen_addrs, la, entry); } - freeifaddrs(ifap); + freeifaddrs(ifa); } TAILQ_FOREACH(la, &conf->listen_addrs, entry) { |