[or-cvs] Make add_file_log return 0 on success.

Nick Mathewson nickm at seul.org
Wed Oct 15 18:38:41 UTC 2003


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv6103/src/common

Modified Files:
	log.c log.h 
Log Message:
Make add_file_log return 0 on success.

Index: log.c
===================================================================
RCS file: /home/or/cvsroot/src/common/log.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- log.c	10 Oct 2003 01:50:20 -0000	1.24
+++ log.c	15 Oct 2003 18:38:38 -0000	1.25
@@ -155,12 +155,13 @@
   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;
 }
 

Index: log.h
===================================================================
RCS file: /home/or/cvsroot/src/common/log.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- log.h	10 Oct 2003 01:48:03 -0000	1.16
+++ log.h	15 Oct 2003 18:38:38 -0000	1.17
@@ -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();
 



More information about the tor-commits mailing list