diff options
author | Brent Cook <bcook@cvs.openbsd.org> | 2015-01-09 23:44:08 +0000 |
---|---|---|
committer | Brent Cook <bcook@cvs.openbsd.org> | 2015-01-09 23:44:08 +0000 |
commit | 6c0adaf4f7ca803f955590d56e739dba13e08b80 (patch) | |
tree | 73a786a54268267fe6a737a51680d9f3e73316fa /usr.sbin/ntpd/client.c | |
parent | ec318fa1440b26ee4159207abf8f32d4d40f6036 (diff) |
return -1 on host() address parsing failure, not 1.
Match what parse.y expects it to return.
ok millert@
Diffstat (limited to 'usr.sbin/ntpd/client.c')
-rw-r--r-- | usr.sbin/ntpd/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c index 0e7d454dbf0..0d984a3def0 100644 --- a/usr.sbin/ntpd/client.c +++ b/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 <henning@openbsd.org> @@ -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; |