gnucash unstable: Little refactor of account.c
Geert Janssens
gjanssens at code.gnucash.org
Wed Oct 25 03:54:07 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/7b1d298b (commit)
from https://github.com/Gnucash/gnucash/commit/444eb1c2 (commit)
commit 7b1d298bc6f586fde60f7a6e96a0b0ea4d8f9b44
Author: Carwyn Nelson <bacondrinker at gmail.com>
Date: Sun Oct 22 20:04:02 2017 +0100
Little refactor of account.c
diff --git a/libgnucash/engine/Account.c b/libgnucash/engine/Account.c
index 2c8b674..1fed1fa 100644
--- a/libgnucash/engine/Account.c
+++ b/libgnucash/engine/Account.c
@@ -4444,17 +4444,17 @@ xaccAccountGetReconcilePostponeBalance (const Account *acc,
g_return_val_if_fail(GNC_IS_ACCOUNT(acc), FALSE);
qof_instance_get_kvp (QOF_INSTANCE(acc),
"reconcile-info/postpone/balance", &v);
- if (G_VALUE_HOLDS_INT64 (&v)) {
- bal = *(gnc_numeric*)g_value_get_boxed (&v);
+ if (!G_VALUE_HOLDS_INT64 (&v))
+ return FALSE;
- if (bal.denom)
- {
- if (balance)
- *balance = bal;
- return TRUE;
- }
- }
- return FALSE;
+ bal = *(gnc_numeric*)g_value_get_boxed (&v);
+ if (!bal.denom)
+ return FALSE;
+
+ if (balance)
+ *balance = bal;
+
+ return TRUE;
}
/********************************************************************\
Summary of changes:
libgnucash/engine/Account.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
More information about the gnucash-changes
mailing list