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.
This commit is contained in:
rofl0r 2020-01-15 15:18:50 +00:00
parent 4fb2c14039
commit eb2104e1ff

View File

@ -74,10 +74,7 @@ static unsigned int logging_initialized = FALSE; /* boolean */
int open_log_file (const char *log_file_name) int open_log_file (const char *log_file_name)
{ {
if (log_file_name == NULL) { if (log_file_name == NULL) {
if(config.godaemon == FALSE) log_file_fd = fileno(stdout);
log_file_fd = fileno(stdout);
else
log_file_fd = -1;
} else { } else {
log_file_fd = create_file_safely (log_file_name, FALSE); log_file_fd = create_file_safely (log_file_name, FALSE);
} }