[Gnucash-changes] make sure that uninitialized value is not accidentally used.

Linas Vepstas linas at cvs.gnucash.org
Fri Aug 27 18:51:05 EDT 2004


Log Message:
-----------
make sure that uninitialized value is not accidentally used.

Modified Files:
--------------
    gnucash/src/app-utils:
        option-util.c

Revision Data
-------------
Index: option-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lsrc/app-utils/option-util.c -Lsrc/app-utils/option-util.c -u -r1.26 -r1.27
--- src/app-utils/option-util.c
+++ src/app-utils/option-util.c
@@ -2130,7 +2130,7 @@
                                  Timespec *default_value)
 {
   GNCOption *option;
-  Timespec temp;
+  Timespec temp = {0,0};
   char *symbol;
   SCM getter;
   SCM value;
@@ -2138,7 +2138,9 @@
   initialize_getters();
 
   if (set_ab_value == NULL)
+  {
     set_ab_value = &temp;
+  }
 
   if(set_rel_value != NULL)
   {
@@ -2147,7 +2149,7 @@
  
   if (is_relative != NULL)
   {
-      *is_relative = FALSE;
+    *is_relative = FALSE;
   }
   
   option = gnc_option_db_get_option_by_name(odb, section, name);


More information about the gnucash-changes mailing list