diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-09 14:49:23 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-01-09 14:49:23 +0000 |
commit | 65cbefc932ed629628895ae2493bd64c22ef3d1e (patch) | |
tree | ea73a27d1af80c78c53341594644b4c83a054ac5 /usr.sbin/ntpd/ntpd.c | |
parent | 086789f41ebba4437094c99922f574254973b86f (diff) |
Stop accessing verbose and debug variables from log.c directly.
This replaces log_verbose() and "extern int verbose" with the two functions
log_setverbose() and log_getverbose().
Pointed out by benno@
OK krw@ eric@ gilles@ (OK gilles@ for the snmpd bits as well)
Diffstat (limited to 'usr.sbin/ntpd/ntpd.c')
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 59f12ab4603..0ec3ede03b4 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.112 2016/12/01 16:24:48 mestre Exp $ */ +/* $OpenBSD: ntpd.c,v 1.113 2017/01/09 14:49:22 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -209,7 +209,7 @@ main(int argc, char *argv[]) reset_adjtime(); if (!lconf.settime) { log_init(lconf.debug, LOG_DAEMON); - log_verbose(lconf.verbose); + log_setverbose(lconf.verbose); if (!lconf.debug) if (daemon(1, 0)) fatal("daemon"); @@ -284,7 +284,7 @@ main(int argc, char *argv[]) lconf.settime = 0; timeout = INFTIM; log_init(lconf.debug, LOG_DAEMON); - log_verbose(lconf.verbose); + log_setverbose(lconf.verbose); log_warnx("no reply received in time, skipping initial " "time setting"); if (!lconf.debug) @@ -384,7 +384,7 @@ dispatch_imsg(struct ntpd_conf *lconf, int argc, char **argv) if (!lconf->settime) break; log_init(lconf->debug, LOG_DAEMON); - log_verbose(lconf->verbose); + log_setverbose(lconf->verbose); memcpy(&d, imsg.data, sizeof(d)); ntpd_settime(d); /* daemonize now */ |