From 7da69142b4d39681a74b9654c5dec1cbc8b9b24b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 21 Feb 2023 14:44:31 +0100 Subject: -misc minor bugfixes --- src/auditor/taler-helper-auditor-purses.c | 10 ++++++---- src/auditor/taler-helper-auditor-reserves.c | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src/auditor') diff --git a/src/auditor/taler-helper-auditor-purses.c b/src/auditor/taler-helper-auditor-purses.c index 13327ccba..f35020734 100644 --- a/src/auditor/taler-helper-auditor-purses.c +++ b/src/auditor/taler-helper-auditor-purses.c @@ -885,8 +885,9 @@ handle_purse_decision ( report_row_inconsistency ("purse-request", rowid, "purse fee higher than balance"); - TALER_amount_set_zero (TALER_ARL_currency, - &balance_without_purse_fee); + GNUNET_assert (GNUNET_OK == + TALER_amount_set_zero (TALER_ARL_currency, + &balance_without_purse_fee)); } if (refunded) @@ -1021,8 +1022,9 @@ verify_purse_balance (void *cls, report_row_inconsistency ("purse", 0, "purse fee higher than balance"); - TALER_amount_set_zero (TALER_ARL_currency, - &balance_without_purse_fee); + GNUNET_assert (GNUNET_OK == + TALER_amount_set_zero (TALER_ARL_currency, + &balance_without_purse_fee)); } if (0 != TALER_amount_cmp (&ps->exchange_balance, diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c index 06c727056..9f8c75c2b 100644 --- a/src/auditor/taler-helper-auditor-reserves.c +++ b/src/auditor/taler-helper-auditor-reserves.c @@ -1081,8 +1081,9 @@ handle_reserve_closed ( } if (NULL == payto_uri) { - if (0 != strcmp (rs->sender_account, - receiver_account)) + if ( (NULL == rs->sender_account) || + (0 != strcmp (rs->sender_account, + receiver_account)) ) { report_row_inconsistency ("reserves_close", rowid, @@ -1110,8 +1111,8 @@ handle_reserve_closed ( rowid, "target account not verified, auditor does not know reserve"); } - if (0 != strcmp (rs->sender_account, - receiver_account)) + else if (0 != strcmp (rs->sender_account, + receiver_account)) { report_row_inconsistency ("reserves_close", rowid, -- cgit v1.2.3