diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2021-10-24 12:25:57 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-27 09:23:12 +0200 |
commit | 464c1f806cd1518ebd87b598c7d8232e9f234ac2 (patch) | |
tree | 13f932e3a7c5494c1c8b15aabf6897844598faf6 /src/exchange/taler-exchange-closer.c | |
parent | d4e03b12ae96d9e540d28b03f11a58dd4101832a (diff) | |
download | exchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.tar.gz exchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.tar.bz2 exchange-464c1f806cd1518ebd87b598c7d8232e9f234ac2.zip |
-more changes towards fixing FTBFS
Diffstat (limited to 'src/exchange/taler-exchange-closer.c')
-rw-r--r-- | src/exchange/taler-exchange-closer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c index 91ececc8..a206cea8 100644 --- a/src/exchange/taler-exchange-closer.c +++ b/src/exchange/taler-exchange-closer.c @@ -217,7 +217,7 @@ expired_reserve_cb (void *cls, struct TALER_WireTransferIdentifierRawP wtid; struct TALER_Amount amount_without_fee; struct TALER_Amount closing_fee; - int ret; + enum TALER_AmountArithmeticResult ret; enum GNUNET_DB_QueryStatus qs; const struct TALER_EXCHANGEDB_AccountInfo *wa; @@ -273,8 +273,8 @@ expired_reserve_cb (void *cls, ret = TALER_amount_subtract (&amount_without_fee, left, &closing_fee); - if ( (GNUNET_SYSERR == ret) || - (GNUNET_NO == ret) ) + if ( (TALER_AAR_INVALID_NEGATIVE_RESULT == ret) || + (TALER_AAR_RESULT_ZERO == ret) ) { /* Closing fee higher than or equal to remaining balance, close without wire transfer. */ @@ -283,6 +283,7 @@ expired_reserve_cb (void *cls, TALER_amount_set_zero (left->currency, &amount_without_fee)); } + GNUNET_assert (TALER_AAR_RESULT_POSITIVE == ret); /* round down to enable transfer */ if (GNUNET_SYSERR == TALER_amount_round_down (&amount_without_fee, |