From eb2104e1ff07dcc7a05f81f8b87db9b6c77d8f5d Mon Sep 17 00:00:00 2001 From: rofl0r Date: Wed, 15 Jan 2020 15:18:50 +0000 Subject: [PATCH] log: remove special case code for daemonized mode without logfile if daemon mode is used and neither logfile nor syslog options specified, this is clearly a misconfiguration issue. don't try to be smart and work around that, so less global state information is required. also, this case is already checked for in main.c:334. --- src/log.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/log.c b/src/log.c index f31696d..7158492 100644 --- a/src/log.c +++ b/src/log.c @@ -74,10 +74,7 @@ static unsigned int logging_initialized = FALSE; /* boolean */ int open_log_file (const char *log_file_name) { if (log_file_name == NULL) { - if(config.godaemon == FALSE) - log_file_fd = fileno(stdout); - else - log_file_fd = -1; + log_file_fd = fileno(stdout); } else { log_file_fd = create_file_safely (log_file_name, FALSE); }