summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-05-11 15:12:36 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-05-11 15:12:36 +0000
commit3c9e07e88ef1a524a9f4bf0ff2ab59ceb2174103 (patch)
tree0e947ff05096aed37ebee1579d14f93efa834964
parent6b3a9f1c6a26242959a6a7b8420e995f08af93f1 (diff)
don't touch *hn in failure case. no real change due to the way we use it
but more correct. from Michael Knudsen <e@molioner.dk>
-rw-r--r--usr.sbin/ntpd/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/config.c b/usr.sbin/ntpd/config.c
index 36f27d42ce3..f36bc6274d9 100644
--- a/usr.sbin/ntpd/config.c
+++ b/usr.sbin/ntpd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.17 2005/03/09 20:31:11 henning Exp $ */
+/* $OpenBSD: config.c,v 1.18 2005/05/11 15:12:35 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -53,9 +53,11 @@ host(const char *s, struct ntp_addr **hn)
if (h == NULL)
h = host_v6(s);
- *hn = h;
if (h == NULL)
return (0);
+
+ *hn = h;
+
return (1);
}