aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/log.c10
-rw-r--r--src/log.h8
2 files changed, 10 insertions, 8 deletions
diff --git a/src/log.c b/src/log.c
index da2361533..feae78bfc 100644
--- a/src/log.c
+++ b/src/log.c
@@ -40,7 +40,7 @@
static unsigned int log_threshold = G_LOG_LEVEL_INFO;
-static int stdout_mode = 1;
+static bool stdout_mode = true;
static int out_fd = -1;
static int err_fd = -1;
static const char *out_filename;
@@ -77,7 +77,7 @@ mpd_log_func(G_GNUC_UNUSED const gchar *log_domain,
message);
}
-void initLog(const int verbose)
+void initLog(bool verbose)
{
ConfigParam *param;
@@ -104,7 +104,7 @@ void initLog(const int verbose)
}
}
-void open_log_files(const int use_stdout)
+void open_log_files(bool use_stdout)
{
mode_t prev;
ConfigParam *param;
@@ -130,12 +130,12 @@ void open_log_files(const int use_stdout)
umask(prev);
}
-void setup_log_output(const int use_stdout)
+void setup_log_output(bool use_stdout)
{
fflush(NULL);
if (!use_stdout) {
redirect_logs();
- stdout_mode = 0;
+ stdout_mode = false;
}
}
diff --git a/src/log.h b/src/log.h
index 275754554..23e6d30be 100644
--- a/src/log.h
+++ b/src/log.h
@@ -21,6 +21,8 @@
#include "gcc.h"
+#include <stdbool.h>
+
mpd_printf void ERROR(const char *fmt, ...);
mpd_printf void LOG(const char *fmt, ...);
mpd_printf void SECURE(const char *fmt, ...);
@@ -28,11 +30,11 @@ mpd_printf void DEBUG(const char *fmt, ...);
mpd_printf void WARNING(const char *fmt, ...);
mpd_printf mpd_noreturn void FATAL(const char *fmt, ...);
-void initLog(const int verbose);
+void initLog(bool verbose);
-void setup_log_output(const int use_stdout);
+void setup_log_output(bool use_stdout);
-void open_log_files(const int use_stdout);
+void open_log_files(bool use_stdout);
int cycle_log_files(void);