From 22ef733058bb2de02af1b1463f51259ab4462df1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 15 Oct 2003 18:38:38 +0000 Subject: Make add_file_log return 0 on success. svn:r594 --- src/common/log.c | 5 +++-- src/common/log.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/log.c b/src/common/log.c index cc65e46e0..c66c43056 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -155,12 +155,13 @@ void add_stream_log(int loglevel, const char *name, FILE *stream) logfiles = lf; } -void add_file_log(int loglevel, const char *filename) +int add_file_log(int loglevel, const char *filename) { FILE *f; f = fopen(filename, "a"); - if (!f) return; + if (!f) return -1; add_stream_log(loglevel, filename, f); logfiles->needs_close = 1; + return 0; } diff --git a/src/common/log.h b/src/common/log.h index 7c481379a..d5b8e9b26 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -28,7 +28,7 @@ void log_set_severity(int severity); void add_stream_log(int loglevel, const char *name, FILE *stream); -void add_file_log(int severity, const char *filename); +int add_file_log(int severity, const char *filename); void close_logs(); void reset_logs(); -- cgit v1.2.3