git » nmdb » commit 31e5c9e

The stdout logging file descriptor is 1, not 0.

author Alberto Bertogli
2007-08-09 06:55:51 UTC
committer Alberto Bertogli
2007-08-09 06:55:51 UTC
parent c91455c113b6e0e24142efd1201faa330c55b651

The stdout logging file descriptor is 1, not 0.

Stupid and embarrasing typo.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/log.c +1 -1

diff --git a/nmdb/log.c b/nmdb/log.c
index 9443a6d..89d107e 100644
--- a/nmdb/log.c
+++ b/nmdb/log.c
@@ -24,7 +24,7 @@ int log_init(void)
 	}
 
 	if (strcmp(settings.logfname, "-") == 0) {
-		logfd = 0;
+		logfd = 1;
 	} else {
 		logfd = open(settings.logfname, O_WRONLY | O_APPEND | O_CREAT);
 		if (logfd < 0)