diff --git a/src/usr.sbin/ntpd/client.c b/src/usr.sbin/ntpd/client.c index 0e7d454d..0d984a3d 100644 --- a/src/usr.sbin/ntpd/client.c +++ b/src/usr.sbin/ntpd/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.96 2015/01/09 07:35:37 deraadt Exp $ */ +/* $OpenBSD: client.c,v 1.97 2015/01/09 23:44:07 bcook Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -112,7 +112,7 @@ client_nextaddr(struct ntp_peer *p) return (-1); } - if ((p->addr = p->addr->next) == NULL) + if (p->addr == NULL || (p->addr = p->addr->next) == NULL) p->addr = p->addr_head.a; p->shift = 0; diff --git a/src/usr.sbin/ntpd/config.c b/src/usr.sbin/ntpd/config.c index b95df25b..cd13a384 100644 --- a/src/usr.sbin/ntpd/config.c +++ b/src/usr.sbin/ntpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.19 2006/05/27 17:01:07 henning Exp $ */ +/* $OpenBSD: config.c,v 1.20 2015/01/09 23:48:21 bcook Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -58,7 +58,7 @@ host(const char *s, struct ntp_addr **hn) *hn = h; - return (1); + return (-1); } struct ntp_addr *