From 76b5bdc2c45da14337c9a1701ba546b9cf4169be Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 1 Jul 2017 16:06:01 +0200 Subject: [PATCH] conf.c: Simplify .conf load/parse debug messages Signed-off-by: Joachim Nilsson --- src/conf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/conf.c b/src/conf.c index 02e11e74..67d0dc4d 100644 --- a/src/conf.c +++ b/src/conf.c @@ -388,13 +388,15 @@ static void tabstospaces(char *line) static int parse_conf_dynamic(char *file, struct timeval *mtime) { - FILE *fp = fopen(file, "r"); + FILE *fp; + fp = fopen(file, "r"); if (!fp) { _pe("Failed opening %s", file); return 1; } + _d("Parsing %s", file); while (!feof(fp)) { char line[LINE_SIZE] = ""; @@ -403,7 +405,7 @@ static int parse_conf_dynamic(char *file, struct timeval *mtime) chomp(line); tabstospaces(line); - _d("dyn conf: %s", line); + _d("%s", line); parse_dynamic(line, mtime); } @@ -445,13 +447,15 @@ static int parse_conf(char *file) if (!silent) print(0, "Loading %sconfiguration", line); + + _d("Parsing %s", file); while (!feof(fp)) { if (!fgets(line, sizeof(line), fp)) continue; chomp(line); tabstospaces(line); - _d("conf: %s", line); + _d("%s", line); parse_static(line); parse_dynamic(line, NULL);