Skip to content

Commit

Permalink
* src/register/ledger-core/split-register-load.c: make the code a
Browse files Browse the repository at this point in the history
	  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.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9841 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
derekatkins committed Mar 3, 2004
1 parent 03ca5f1 commit f4fe3f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
2004-03-03 Derek Atkins <derek@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@tuhh.de>

* configure.in: Require the correct openhbci2 version. Add verbose
Expand Down
14 changes: 7 additions & 7 deletions src/register/ledger-core/split-register-load.c
Expand Up @@ -174,7 +174,7 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,
/* 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.
Expand All @@ -193,14 +193,14 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,

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;
Expand Down

0 comments on commit f4fe3f0

Please sign in to comment.