summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-10-18 02:22:45 (GMT)
committerLennart Poettering <lennart@poettering.net>2009-10-18 02:22:45 (GMT)
commit9a6070daa32be10cf342efb941b7a58aa53d9079 (patch)
tree0e7a2ade4c1a71e3b631c7aa32b5ca9c6378b827
parent1368b794c3079c2c641a406f004e207bdbc746a0 (diff)
downloadlibdaemon-9a6070daa32be10cf342efb941b7a58aa53d9079.tar.gz
libdaemon-9a6070daa32be10cf342efb941b7a58aa53d9079.tar.xz
dlog: reformat daemon_set_verbosity()
-rw-r--r--libdaemon/dlog.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libdaemon/dlog.c b/libdaemon/dlog.c
index b9f224e..22d9504 100644
--- a/libdaemon/dlog.c
+++ b/libdaemon/dlog.c
@@ -36,14 +36,11 @@ static int daemon_verbosity_level = LOG_WARNING;
void daemon_set_verbosity(int verbosity_prio) {
- /* Allow using negative verbosity levels to hide _all_ messages */
- if ( verbosity_prio > 0 &&
- (verbosity_prio & LOG_PRIMASK) != LOG_PRIMASK ) {
- daemon_log(LOG_ERR, "The value %d is not a valid priority value",
- verbosity_prio);
- }
-
- daemon_verbosity_level = verbosity_prio & LOG_PRIMASK;
+ /* Allow using negative verbosity levels to hide _all_ messages */
+ if (verbosity_prio > 0 && (verbosity_prio & LOG_PRIMASK) != LOG_PRIMASK)
+ daemon_log(LOG_ERR, "The value %d is not a valid priority value", verbosity_prio);
+
+ daemon_verbosity_level = verbosity_prio & LOG_PRIMASK;
}
void daemon_logv(int prio, const char* template, va_list arglist) {
@@ -56,8 +53,8 @@ void daemon_logv(int prio, const char* template, va_list arglist) {
vsyslog(prio | LOG_DAEMON, template, arglist);
}
- if ( prio > daemon_verbosity_level )
- goto end_daemon_logv;
+ if (prio > daemon_verbosity_level)
+ goto end_daemon_logv;
if (daemon_log_use & DAEMON_LOG_STDERR) {
vfprintf(stderr, template, arglist);