[grisbi-cvs] grisbi/src gsb_data_payee.c,1.44,1.45

Pierre Biava pbiava at users.sourceforge.net
Tue Apr 21 22:34:52 CEST 2009


Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9853

Modified Files:
	gsb_data_payee.c 
Log Message:
fix the bug 546

Index: gsb_data_payee.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_payee.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- gsb_data_payee.c	18 Apr 2009 23:03:53 -0000	1.44
+++ gsb_data_payee.c	21 Apr 2009 20:34:50 -0000	1.45
@@ -773,15 +773,15 @@
     tmp_list = gsb_data_transaction_get_complete_transactions_list ();
     while (tmp_list)
     {
-	gint payee_number;
+        gint payee_number;
 
-	payee_number = gsb_data_transaction_get_party_number (gsb_data_transaction_get_transaction_number (tmp_list -> data));
-	if (!g_slist_find (used, GINT_TO_POINTER (payee_number)))
-	{
-	    used = g_slist_append ( used,
-				    GINT_TO_POINTER (payee_number));
-	}
-	tmp_list = tmp_list -> next;
+        payee_number = gsb_data_transaction_get_party_number (
+                    gsb_data_transaction_get_transaction_number (tmp_list -> data));
+        if (!g_slist_find (used, GINT_TO_POINTER (payee_number)))
+        {
+            used = g_slist_append ( used, GINT_TO_POINTER (payee_number));
+        }
+        tmp_list = tmp_list -> next;
     }
 
     /* it also scans the list of sheduled transactions. fix bug 538 */
@@ -795,30 +795,25 @@
                         tmp_list -> data));
         if (!g_slist_find (used, GINT_TO_POINTER (payee_number)))
         {
-            used = g_slist_append ( used,
-                        GINT_TO_POINTER (payee_number));
+            used = g_slist_append ( used, GINT_TO_POINTER (payee_number));
         }
         tmp_list = tmp_list -> next;
     }
 
-    if (!used)
-	return 0;
-
     /* now check each payee to know if it is used */
     tmp_list = gsb_data_payee_get_payees_list ();
     while (tmp_list)
     {
-	struct_payee *payee = tmp_list -> data;
-
-	tmp_list = tmp_list -> next;
+        struct_payee *payee = tmp_list -> data;
 
-	if (!g_slist_find (used, GINT_TO_POINTER (payee -> payee_number)))
-	{
-	    /* payee not used */
-	    payee_buffer = payee;	/* increase speed */
-	    gsb_data_payee_remove (payee -> payee_number);
-	    nb_removed++;
-	}
+        tmp_list = tmp_list -> next;
+        if ( !used || !g_slist_find (used, GINT_TO_POINTER (payee -> payee_number)))
+        {
+            /* payee not used */
+            payee_buffer = payee;	/* increase speed */
+            gsb_data_payee_remove (payee -> payee_number);
+            nb_removed++;
+        }
     }
     return nb_removed;
 }



More information about the cvs mailing list