r15556 - gnucash/trunk/lib/libqof/qof - Better handling of NULL filename.

Josh Sled jsled at cvs.gnucash.org
Sat Feb 10 15:05:57 EST 2007


Author: jsled
Date: 2007-02-10 15:05:56 -0500 (Sat, 10 Feb 2007)
New Revision: 15556
Trac: http://svn.gnucash.org/trac/changeset/15556

Modified:
   gnucash/trunk/lib/libqof/qof/qoflog.c
Log:
Better handling of NULL filename.


Modified: gnucash/trunk/lib/libqof/qof/qoflog.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qoflog.c	2007-02-10 19:06:39 UTC (rev 15555)
+++ gnucash/trunk/lib/libqof/qof/qoflog.c	2007-02-10 20:05:56 UTC (rev 15556)
@@ -131,13 +131,8 @@
      if (log_table == NULL)
           log_table = g_hash_table_new(g_str_hash, g_str_equal);
 
-     // don't prevent multiple qof_log_init() calls to screw this up.
-     if (!log_filename && fout == NULL)
+     if (log_filename)
      {
-          fout = stderr;
-     }
-     else
-     {
           int fd;
           gchar *fname;
 
@@ -172,7 +167,7 @@
 	if (fout && fout != stderr && fout != stdout)
     {
          fclose(fout);
-         fout == NULL;
+         fout = NULL;
     }
 
 	if (function_buffer)



More information about the gnucash-changes mailing list