[Gnucash-changes] gnucash

Derek Atkins warlord at cvs.gnucash.org
Tue Mar 2 22:40:51 EST 2004


Update of /home/cvs/cvsroot/gnucash
In directory cvs.gnucash.org:/tmp/cvs-serv27305

Modified Files:
	ChangeLog 
Log Message:
	* src/register/ledger-core/split-register-load.c: make the code a
	  little cleaner by not re-using (and re-defining!) the same
	  variable name inside a block of code and "over-riding" an
	  existing variable.  Unlikely to actually fix anything, but
	  you never know what a compiler might do.


Update of /home/cvs/cvsroot/gnucash/src/register/ledger-core
In directory cvs.gnucash.org:/tmp/cvs-serv27305/src/register/ledger-core

Modified Files:
	split-register-load.c 
Log Message:
	* src/register/ledger-core/split-register-load.c: make the code a
	  little cleaner by not re-using (and re-defining!) the same
	  variable name inside a block of code and "over-riding" an
	  existing variable.  Unlikely to actually fix anything, but
	  you never know what a compiler might do.



==================================================
Differences for ChangeLog (revision 1.1786 -> 1.1787)
==================================================
--- /home/cvs/cvsroot/gnucash/ChangeLog	2004/02/14 12:12:23	1.1786
+++ /home/cvs/cvsroot/gnucash/ChangeLog	2004/03/03 03:40:50	1.1787
@@ -1,3 +1,11 @@
+2004-03-03  Derek Atkins  <derek at ihtfp.com>
+
+	* src/register/ledger-core/split-register-load.c: make the code a
+	  little cleaner by not re-using (and re-defining!) the same
+	  variable name inside a block of code and "over-riding" an
+	  existing variable.  Unlikely to actually fix anything, but
+	  you never know what a compiler might do.
+
 2004-02-14  Christian Stimming  <stimming at tuhh.de>
 
 	* configure.in: Require the correct openhbci2 version. Add verbose

==================================================
Differences for split-register-load.c (revision 1.24 -> 1.25)
==================================================
--- /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-load.c	2003/03/16 22:48:19	1.24
+++ /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-load.c	2004/03/03 03:40:51	1.25
@@ -174,7 +174,7 @@
   /* make sure we have a blank split */
   if (blank_split == NULL)
   {
-    Transaction *trans;
+    Transaction *new_trans;
     gnc_commodity * currency = NULL;
 
     /* Determine the proper currency to use for this transaction.
@@ -193,14 +193,14 @@
 
     gnc_suspend_gui_refresh ();
 
-    trans = xaccMallocTransaction (gnc_get_current_book ());
+    new_trans = xaccMallocTransaction (gnc_get_current_book ());
 
-    xaccTransBeginEdit (trans);
-    xaccTransSetCurrency (trans, currency ? currency : gnc_default_currency ());
-    xaccTransSetDateSecs (trans, info->last_date_entered);
+    xaccTransBeginEdit (new_trans);
+    xaccTransSetCurrency (new_trans, currency ? currency : gnc_default_currency ());
+    xaccTransSetDateSecs (new_trans, info->last_date_entered);
     blank_split = xaccMallocSplit (gnc_get_current_book ());
-    xaccTransAppendSplit (trans, blank_split);
-    xaccTransCommitEdit (trans);
+    xaccTransAppendSplit (new_trans, blank_split);
+    xaccTransCommitEdit (new_trans);
 
     info->blank_split_guid = *xaccSplitGetGUID (blank_split);
     info->blank_split_edited = FALSE;


More information about the Gnucash-changes mailing list