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 committed 2020-01-15 15:22:43 +00:00
1 parent 4fb2c14039
commit eb2104e1ff
1 file changed
+1 -4
+1 -4
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);
} }