diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-08 15:06:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-07-08 15:06:44 +0000 |
commit | 7ba81315b7c5958d49c13c4cf0525e913eddeb6f (patch) | |
tree | 0ceccc239acd474171cccf8f8918e067e032f885 | |
parent | ec7287d19d5374ecc8addc2409cfc05d51df7e71 (diff) |
kill traces of on-the-fly reconfigure (from bgpd), not needed in ntpd
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 4 | ||||
-rw-r--r-- | usr.sbin/ntpd/parse.y | 31 |
2 files changed, 3 insertions, 32 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 664257ed025..2998b271ad2 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.7 2004/07/07 06:57:13 henning Exp $ */ +/* $OpenBSD: ntpd.c,v 1.8 2004/07/08 15:06:43 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -91,8 +91,6 @@ main(int argc, char *argv[]) conffile = CONFFILE; bzero(&conf, sizeof(conf)); - TAILQ_INIT(&conf.listen_addrs); - TAILQ_INIT(&conf.ntp_peers); log_init(1); /* log to stderr until daemonized */ diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y index 194dffbe6ea..2adc473dfa3 100644 --- a/usr.sbin/ntpd/parse.y +++ b/usr.sbin/ntpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.8 2004/07/08 01:22:57 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.9 2004/07/08 15:06:43 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -425,11 +425,8 @@ int parse_config(char *filename, struct ntpd_conf *xconf) { struct sym *sym, *next; - struct listen_addr *la; - struct ntp_peer *p; - if ((conf = calloc(1, sizeof(struct ntpd_conf))) == NULL) - fatal(NULL); + conf = xconf; lineno = 1; errors = 0; TAILQ_INIT(&conf->listen_addrs); @@ -460,30 +457,6 @@ parse_config(char *filename, struct ntpd_conf *xconf) } } - while ((la = TAILQ_FIRST(&xconf->listen_addrs)) != NULL) { - TAILQ_REMOVE(&xconf->listen_addrs, la, entry); - free(la); - } - - while ((la = TAILQ_FIRST(&conf->listen_addrs)) != NULL) { - TAILQ_REMOVE(&conf->listen_addrs, la, entry); - TAILQ_INSERT_TAIL(&xconf->listen_addrs, la, entry); - } - - while ((p = TAILQ_FIRST(&xconf->ntp_peers)) != NULL) { - TAILQ_REMOVE(&xconf->ntp_peers, p, entry); - free(p); - } - - while ((p = TAILQ_FIRST(&conf->ntp_peers)) != NULL) { - TAILQ_REMOVE(&conf->ntp_peers, p, entry); - TAILQ_INSERT_TAIL(&xconf->ntp_peers, p, entry); - } - - xconf->listen_all = conf->listen_all; - - free(conf); - return (errors ? -1 : 0); } |