From ddba16a7f4ce63117f10feb256f907bae29c1cad Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 8 Apr 2009 13:46:20 -0700 Subject: [PATCH] vlog: Make vlog_reopen_log_file() a no-op if no log file is open. The --log-file option is supposed to be used to create a log file, but until now, even if this isn't done, --reopen to the vlogconf program will make it open one. This behavior was unexpected, hence this commit that prevents it from happening. Fixes bug #905. --- lib/vlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vlog.c b/lib/vlog.c index 64dc1966..63d274cc 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -317,7 +317,7 @@ vlog_set_log_file(const char *file_name) int vlog_reopen_log_file(void) { - return vlog_set_log_file(log_file_name); + return log_file_name ? vlog_set_log_file(log_file_name) : 0; } /* Set debugging levels: -- 2.30.2