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 /sbin/iked/log.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 'sbin/iked/log.c')
-rw-r--r-- | sbin/iked/log.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sbin/iked/log.c b/sbin/iked/log.c index e644eb6c299..d0494caaedc 100644 --- a/sbin/iked/log.c +++ b/sbin/iked/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.10 2017/01/08 20:31:03 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.11 2017/01/09 14:49:21 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -24,13 +24,14 @@ #include <errno.h> #include <time.h> -int debug; -int verbose; +static int debug; +static int verbose; const char *log_procname; void log_init(int, int); void log_procinit(const char *); -void log_verbose(int); +void log_setverbose(int); +int log_getverbose(void); void log_warn(const char *, ...) __attribute__((__format__ (printf, 1, 2))); void log_warnx(const char *, ...) @@ -71,11 +72,17 @@ log_procinit(const char *procname) } void -log_verbose(int v) +log_setverbose(int v) { verbose = v; } +int +log_getverbose(void) +{ + return (verbose); +} + void logit(int pri, const char *fmt, ...) { |