[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_5-153-g444e82c

Pierre Biava nobody at users.sourceforge.net
Sun Oct 7 19:32:51 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  444e82ca1ce347a09356bdacfb8e939164c42f73 (commit)
      from  bfafd6ea8a8b32b3846233ec8be284e09727bb3d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 444e82ca1ce347a09356bdacfb8e939164c42f73
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Oct 7 06:22:01 2012 +0200

    minor changes

-----------------------------------------------------------------------

Changes:
diff --git a/src/bet_graph.c b/src/bet_graph.c
index 2ed8155..0d2fcff 100644
--- a/src/bet_graph.c
+++ b/src/bet_graph.c
@@ -270,6 +270,8 @@ gboolean bet_graph_populate_sectors_by_sub_divisions ( struct_bet_graph_data *se
                             self->montant += tab_montant_division[self -> nbre_elemnts];
 
                         self -> nbre_elemnts++;
+                        g_free ( desc );
+                        g_free ( amount );
                     }
                 }
                 
@@ -812,8 +814,8 @@ gboolean bet_graph_populate_sectors_by_hist_data ( struct_bet_graph_data *self )
         type_compte = gsb_data_account_get_kind ( account_number );
         do
         {
-            gchar *desc;
-            gchar *amount;
+            gchar *desc = NULL;
+            gchar *amount = NULL;
             gint div;
             gint type_infos;
 
@@ -830,13 +832,15 @@ gboolean bet_graph_populate_sectors_by_hist_data ( struct_bet_graph_data *self )
                 strncpy ( &libelle_division[self -> nbre_elemnts * TAILLE_MAX_LIBELLE], desc, TAILLE_MAX_LIBELLE );
                 tab_montant_division[self -> nbre_elemnts] = utils_str_strtod ( ( amount == NULL) ? "0" : amount, NULL );
 
-                if ( type_compte ==  GSB_TYPE_CASH && tab_montant_division[self -> nbre_elemnts] < 0 )
+                if ( tab_montant_division[self -> nbre_elemnts] < 0 )
                     self->montant += -tab_montant_division[self -> nbre_elemnts];
                 else
                     self->montant += tab_montant_division[self -> nbre_elemnts];
 
                 self -> nbre_elemnts++;
             }
+            g_free ( desc );
+            g_free ( amount );
 
             if ( self -> nbre_elemnts >= MAX_SEGMENT_CAMEMBERT )
                 break;


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list