rem: total += amount;
context: void recuperation_donnees_gnucash_transaction ( xmlNodePtr transaction_node ){  struct struct_ope_importation * transaction;  gchar * date_string, *space, *tiers;  GDate * date;  xmlNodePtr splits, split_node, date_node;  GSList * split_list = NULL;  gdouble total = 0;  /* Transaction amount, category, account, etc.. */  splits = get_child ( transaction_node, "splits" );  split_node = splits -> children;  while ( split_node )    {      struct struct_compte_importation * split_account = NULL;       struct gnucash_category * categ = NULL;      struct gnucash_split * split;      gdouble amount;      if ( node_strcmp ( split_node, "split" ) )	{	  gchar * account_name = NULL, * categ_name = NULL;	  split_account = find_imported_account_by_uid ( child_content ( split_node, 									"account" ) );	  categ = find_imported_categ_by_uid ( child_content ( split_node, "account" ) );	  if ( categ ) 	    categ_name = categ -> name;	  if ( split_account )	    account_name = split_account -> nom_de_compte;	  amount = gnucash_value ( child_content(split_node, "value") );	  split = find_split ( split_list, amount, split_account, categ );	  if ( split )	    {	      update_split ( split, account_name, categ_name );	    }	  else	    {	      split = new_split ( amount, account_name, categ_name );	      split_list = g_slist_append ( split_list, split );	      split -> notes = child_content(split_node, "memo");	    }	}      total += amount;      split_node = split_node -> next;    }  /* Transaction date */  date_node = get_child ( transaction_node, "date-posted" );  date_string = child_content (date_node, "date");  space = strchr ( date_string, ' ' );  if ( space )    *space = 0;  date = g_date_new ();  g_date_set_parse ( date, date_string );  if ( !g_date_valid ( date ))    fprintf ( stderr, "grisbi: Can't parse date %s\n", date_string );  /* Tiers */  tiers = child_content ( transaction_node, "description" );  if ( g_slist_length ( split_list ) == 1 )    {      struct struct_compte_importation * account = NULL;       struct gnucash_split * split = split_list -> data;      transaction = new_transaction_from_split ( split, tiers, date );      account = find_imported_account_by_name ( split -> account );      if ( account )	account -> operations_importees = g_slist_append ( account -> operations_importees, transaction );    }  else     {      while ( split_list )	{	  struct gnucash_split * split = split_list -> data;	  struct struct_compte_importation * account = NULL; 	  	  transaction = new_transaction_from_split ( split, tiers, date );	  account = find_imported_account_by_name ( split -> account );	  if ( account )	    account -> operations_importees = g_slist_append ( account -> operations_importees, transaction );      	  /* 		  if ( !strcmp(child_content(split_node, "reconciled-state"), "y") ) */	  /* 		    transaction -> p_r = OPERATION_RAPPROCHEE; */      	  split_list = split_list -> next;	}    }}