summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-08 23:52:01 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-08 23:52:01 +0200
commit84a40be0bce66cda800de7891f758a0c69afc7fa (patch)
treeaff8ee61032353024cf1a8429f0804162f81085a /src/lib/exchange_api_common.c
parent1554cc310d450ee5cfbf3afd947ed8a063043254 (diff)
downloadexchange-84a40be0bce66cda800de7891f758a0c69afc7fa.tar.gz
exchange-84a40be0bce66cda800de7891f758a0c69afc7fa.tar.bz2
exchange-84a40be0bce66cda800de7891f758a0c69afc7fa.zip
fix #6170 and rest of #6164
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r--src/lib/exchange_api_common.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index d441807a..07f5e187 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -117,7 +117,7 @@ TALER_EXCHANGE_parse_reserve_history (
};
rh->type = TALER_EXCHANGE_RTT_CREDIT;
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&total_in,
&total_in,
&amount))
@@ -233,7 +233,7 @@ TALER_EXCHANGE_parse_reserve_history (
}
uuid_off++;
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&total_out,
&total_out,
&amount))
@@ -301,7 +301,7 @@ TALER_EXCHANGE_parse_reserve_history (
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&total_in,
&total_in,
&rh->amount))
@@ -378,7 +378,7 @@ TALER_EXCHANGE_parse_reserve_history (
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&total_out,
&total_out,
&rh->amount))
@@ -398,7 +398,7 @@ TALER_EXCHANGE_parse_reserve_history (
}
/* check balance = total_in - total_out < withdraw-amount */
- if (GNUNET_SYSERR ==
+ if (0 >
TALER_amount_subtract (balance,
&total_in,
&total_out))
@@ -750,7 +750,7 @@ TALER_EXCHANGE_verify_coin_history (
if (GNUNET_YES == add)
{
/* This amount should be added to the total */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (total,
total,
&amount))
@@ -768,7 +768,7 @@ TALER_EXCHANGE_verify_coin_history (
these negative amounts, as we might get refunds before
deposits from a semi-evil exchange. Then, at the end, we do
the subtraction by calculating "total = total - rtotal" */GNUNET_assert (GNUNET_NO == add);
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_add (&rtotal,
&rtotal,
&amount))
@@ -781,7 +781,7 @@ TALER_EXCHANGE_verify_coin_history (
}
/* Finally, subtract 'rtotal' from total to handle the subtractions */
- if (GNUNET_OK !=
+ if (0 >
TALER_amount_subtract (total,
total,
&rtotal))