[gnc-autoclear.c] tidy xaccAccountGetSplitList

because acc_splits will need to be g_list_free in a future commit
This commit is contained in:
Christopher Lam 2024-04-15 22:10:05 +08:00
parent 6eed5b6641
commit f21f4f4264

View File

@ -122,7 +122,8 @@ gnc_autoclear_get_splits (Account *account, gnc_numeric toclear_value,
DUP_LIST = g_list_prepend (NULL, NULL);
/* Extract which splits are not cleared and compute the amount we have to clear */
for (GList *node = xaccAccountGetSplitList (account); node; node = node->next)
GList *acc_splits = xaccAccountGetSplitList (account);
for (GList *node = acc_splits; node; node = node->next)
{
Split *split = (Split *)node->data;
gnc_numeric amount = xaccSplitGetAmount (split);