From 84a40be0bce66cda800de7891f758a0c69afc7fa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 8 Apr 2020 23:52:01 +0200 Subject: fix #6170 and rest of #6164 --- src/exchangedb/exchangedb_transactions.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/exchangedb/exchangedb_transactions.c') diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c index ade7f9cf2..7fe65d523 100644 --- a/src/exchangedb/exchangedb_transactions.c +++ b/src/exchangedb/exchangedb_transactions.c @@ -55,7 +55,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( { case TALER_EXCHANGEDB_TT_DEPOSIT: /* spent += pos->amount_with_fee */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&spent, &spent, &pos->details.deposit->amount_with_fee)) @@ -67,7 +67,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( break; case TALER_EXCHANGEDB_TT_MELT: /* spent += pos->amount_with_fee */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&spent, &spent, &pos->details.melt->amount_with_fee)) @@ -78,7 +78,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( break; case TALER_EXCHANGEDB_TT_REFUND: /* refunded += pos->refund_amount - pos->refund_fee */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&refunded, &refunded, &pos->details.refund->refund_amount)) @@ -86,7 +86,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( GNUNET_break (0); return GNUNET_SYSERR; } - if (GNUNET_OK != + if (0 > TALER_amount_add (&spent, &spent, &pos->details.refund->refund_fee)) @@ -98,7 +98,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( break; case TALER_EXCHANGEDB_TT_OLD_COIN_RECOUP: /* refunded += pos->value */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&refunded, &refunded, &pos->details.old_coin_recoup->value)) @@ -109,7 +109,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( break; case TALER_EXCHANGEDB_TT_RECOUP: /* spent += pos->value */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&spent, &spent, &pos->details.recoup->value)) @@ -120,7 +120,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( break; case TALER_EXCHANGEDB_TT_RECOUP_REFRESH: /* spent += pos->value */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&spent, &spent, &pos->details.recoup_refresh->value)) @@ -134,7 +134,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( if (have_refund) { /* If we gave any refund, also discount ONE deposit fee */ - if (GNUNET_OK != + if (0 > TALER_amount_add (&refunded, &refunded, &deposit_fee)) @@ -144,7 +144,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals ( } } /* spent = spent - refunded */ - if (GNUNET_SYSERR == + if (0 > TALER_amount_subtract (&spent, &spent, &refunded)) -- cgit v1.2.3