summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-23 13:02:04 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-23 13:02:04 +0200
commit306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70 (patch)
treecb870eb6b35b952eb2b015a7ef63010b73552d2d /src
parent23e084718897f948d9256b898fc3a2a6ff582341 (diff)
downloadexchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.tar.gz
exchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.tar.bz2
exchange-306a08a71c0f1e8e3e549fbb72c0eecdb3ec9a70.zip
-rename TALER_amount_get_zero to TALER_amount_set_zero
Diffstat (limited to 'src')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c28
-rw-r--r--src/auditor/taler-helper-auditor-coins.c48
-rw-r--r--src/auditor/taler-helper-auditor-deposits.c2
-rw-r--r--src/auditor/taler-helper-auditor-reserves.c42
-rw-r--r--src/auditor/taler-helper-auditor-wire.c18
-rw-r--r--src/bank-lib/fakebank.c2
-rw-r--r--src/benchmark/taler-exchange-benchmark.c2
-rw-r--r--src/exchange/taler-exchange-aggregator.c4
-rw-r--r--src/exchange/taler-exchange-closer.c2
-rw-r--r--src/exchange/taler-exchange-httpd_recoup.c4
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c2
-rw-r--r--src/exchangedb/exchangedb_transactions.c2
-rw-r--r--src/exchangedb/test_exchangedb.c2
-rw-r--r--src/include/taler_amount_lib.h2
-rw-r--r--src/lib/exchange_api_common.c8
-rw-r--r--src/lib/exchange_api_refresh_common.c2
-rw-r--r--src/lib/exchange_api_transfers_get.c2
-rw-r--r--src/util/amount.c6
18 files changed, 89 insertions, 89 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index 27c67ea5..cdcbd37d 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -399,16 +399,16 @@ check_transaction_history_for_deposit (
"Checking transaction history of coin %s\n",
TALER_B2S (coin_pub));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&expenditures));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&refunds));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
merchant_gain));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&merchant_loss));
/* Go over transaction history to compute totals; note that we do not bother
to reconstruct the order of the events, so instead of subtracting we
@@ -625,7 +625,7 @@ check_transaction_history_for_deposit (
as a NEGATIVE contribution as that is not allowed; so
let's count it as zero as that's the best we can do. */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
merchant_gain));
}
else
@@ -1055,7 +1055,7 @@ check_wire_out_cb (void *cls,
wcc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
wcc.date = date;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount->currency,
+ TALER_amount_set_zero (amount->currency,
&wcc.total_deposits));
if (GNUNET_OK !=
TALER_JSON_merchant_wire_signature_hash (wire,
@@ -1339,28 +1339,28 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting audit\n");
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_aggregation_fee_income));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_wire_out_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_wire_out_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_coin_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_coin_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_sig_loss));
GNUNET_assert (NULL !=
(report_row_inconsistencies
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index 7b91e77b..58c06bed 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -480,13 +480,13 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
return qs;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (value->currency,
+ TALER_amount_set_zero (value->currency,
&refunded));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (value->currency,
+ TALER_amount_set_zero (value->currency,
&spent));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (value->currency,
+ TALER_amount_set_zero (value->currency,
&deposit_fee));
have_refund = GNUNET_NO;
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
@@ -695,16 +695,16 @@ init_denomination (const struct GNUNET_HashCode *denom_hash,
else
{
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&ds->denom_balance));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&ds->denom_loss));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&ds->denom_risk));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&ds->denom_recoup));
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1374,7 +1374,7 @@ refresh_session_cb (void *cls,
/* Check that the resulting amounts are consistent with the value being
refreshed by calculating the total refresh cost */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount_with_fee->currency,
+ TALER_amount_set_zero (amount_with_fee->currency,
&refresh_cost));
for (unsigned int i = 0; i<reveal_ctx.num_freshcoins; i++)
{
@@ -1415,7 +1415,7 @@ refresh_session_cb (void *cls,
/* To continue, best assumption is the melted coin contributed
nothing (=> all withdrawal amounts will be counted as losses) */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&amount_without_fee));
}
}
@@ -2549,49 +2549,49 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting audit\n");
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&reported_emergency_loss));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&reported_emergency_risk_by_amount));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&reported_emergency_risk_by_count));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&reported_emergency_loss_by_count));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_escrow_balance));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_risk));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_recoup_loss));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_irregular_recoups));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_deposit_fee_income));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_melt_fee_income));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_refund_fee_income));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_sig_loss));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_refresh_hanging));
GNUNET_assert (NULL !=
(report_emergencies = json_array ()));
diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c
index 6bf94589..a0a86540 100644
--- a/src/auditor/taler-helper-auditor-deposits.c
+++ b/src/auditor/taler-helper-auditor-deposits.c
@@ -212,7 +212,7 @@ analyze_deposit_confirmations (void *cls)
/* setup 'cc' */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&dcc.missed_amount));
dcc.qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
dcc.missed_count = 0LLU;
diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c
index 87b555e0..41580e0c 100644
--- a/src/auditor/taler-helper-auditor-reserves.c
+++ b/src/auditor/taler-helper-auditor-reserves.c
@@ -326,10 +326,10 @@ load_auditor_reserve_summary (struct ReserveSummary *rs)
{
rs->had_ri = GNUNET_NO;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (rs->total_in.currency,
+ TALER_amount_set_zero (rs->total_in.currency,
&rs->balance_at_previous_audit));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (rs->total_in.currency,
+ TALER_amount_set_zero (rs->total_in.currency,
&rs->a_withdraw_fee_balance));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating fresh reserve `%s' with starting balance %s\n",
@@ -426,10 +426,10 @@ handle_reserve_in (void *cls,
rs->reserve_pub = *reserve_pub;
rs->total_in = *credit;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (credit->currency,
+ TALER_amount_set_zero (credit->currency,
&rs->total_out));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (credit->currency,
+ TALER_amount_set_zero (credit->currency,
&rs->total_fee));
if (0 > (qs = load_auditor_reserve_summary (rs)))
{
@@ -612,10 +612,10 @@ handle_reserve_out (void *cls,
rs->reserve_pub = *reserve_pub;
rs->total_out = auditor_amount_with_fee;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount_with_fee->currency,
+ TALER_amount_set_zero (amount_with_fee->currency,
&rs->total_in));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount_with_fee->currency,
+ TALER_amount_set_zero (amount_with_fee->currency,
&rs->total_fee));
qs = load_auditor_reserve_summary (rs);
if (0 > qs)
@@ -800,10 +800,10 @@ handle_recoup_by_reserve (
rs->reserve_pub = *reserve_pub;
rs->total_in = *amount;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount->currency,
+ TALER_amount_set_zero (amount->currency,
&rs->total_out));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount->currency,
+ TALER_amount_set_zero (amount->currency,
&rs->total_fee));
qs = load_auditor_reserve_summary (rs);
if (0 > qs)
@@ -939,7 +939,7 @@ handle_reserve_closed (
rs->total_out = *amount_with_fee;
rs->total_fee = *closing_fee;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (amount_with_fee->currency,
+ TALER_amount_set_zero (amount_with_fee->currency,
&rs->total_in));
qs = load_auditor_reserve_summary (rs);
if (0 > qs)
@@ -1058,7 +1058,7 @@ verify_reserve_balance (void *cls,
TALER_JSON_from_amount (&loss)));
/* Continue with a reserve balance of zero */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (balance.currency,
+ TALER_amount_set_zero (balance.currency,
&nbalance));
}
@@ -1226,7 +1226,7 @@ verify_reserve_balance (void *cls,
/* We unexpectedly went negative, so a sane value to continue from
would be zero. */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_escrow_balance));
}
else
@@ -1507,34 +1507,34 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting audit\n");
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_escrow_balance));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_irregular_recoups));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_withdraw_fee_income));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_balance_insufficient_loss));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_balance_summary_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_balance_summary_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_arithmetic_delta_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_balance_reserve_not_closed));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_sig_loss));
GNUNET_assert (NULL !=
(report_row_inconsistencies = json_array ()));
diff --git a/src/auditor/taler-helper-auditor-wire.c b/src/auditor/taler-helper-auditor-wire.c
index 5e870813..f98975c6 100644
--- a/src/auditor/taler-helper-auditor-wire.c
+++ b/src/auditor/taler-helper-auditor-wire.c
@@ -2143,31 +2143,31 @@ run (void *cls,
GNUNET_assert (NULL !=
(report_account_progress = json_array ()));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_amount_out_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_amount_out_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_amount_in_plus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_bad_amount_in_minus));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_missattribution_in));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_amount_lag));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_closure_amount_lag));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&total_wire_format_amount));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TALER_ARL_currency,
+ TALER_amount_set_zero (TALER_ARL_currency,
&zero));
TALER_EXCHANGEDB_find_accounts (TALER_ARL_cfg,
&process_account_cb,
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index fe9d4818..f728ca47 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -376,7 +376,7 @@ lookup_account (struct TALER_FAKEBANK_Handle *h,
account = GNUNET_new (struct Account);
account->account_name = GNUNET_strdup (name);
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (h->currency,
+ TALER_amount_set_zero (h->currency,
&account->balance));
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_put (h->accounts,
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 95789b81..bee66ff0 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -328,7 +328,7 @@ run (void *cls,
GNUNET_asprintf (&amount_5, "%s:5", currency);
GNUNET_asprintf (&amount_4, "%s:4", currency);
GNUNET_asprintf (&amount_1, "%s:1", currency);
- GNUNET_assert (GNUNET_OK == TALER_amount_get_zero (currency,
+ GNUNET_assert (GNUNET_OK == TALER_amount_set_zero (currency,
&total_reserve_amount));
total_reserve_amount.value = 5 * howmany_coins;
GNUNET_asprintf (&withdraw_fee_str,
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 631599c4..786183ad 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -398,7 +398,7 @@ deposit_cb (void *cls,
(unsigned long long) row_id,
TALER_amount2s (amount_with_fee));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (au->total_amount.currency,
+ TALER_amount_set_zero (au->total_amount.currency,
&au->total_amount));
}
else
@@ -576,7 +576,7 @@ aggregate_cb (void *cls,
(unsigned long long) row_id,
TALER_amount2s (&au->total_amount));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (old.currency,
+ TALER_amount_set_zero (old.currency,
&au->total_amount));
}
else
diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c
index d797c545..0fd5e1d5 100644
--- a/src/exchange/taler-exchange-closer.c
+++ b/src/exchange/taler-exchange-closer.c
@@ -312,7 +312,7 @@ expired_reserve_cb (void *cls,
without wire transfer. */
closing_fee = *left;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (left->currency,
+ TALER_amount_set_zero (left->currency,
&amount_without_fee));
}
/* round down to enable transfer */
diff --git a/src/exchange/taler-exchange-httpd_recoup.c b/src/exchange/taler-exchange-httpd_recoup.c
index cd12be0d..0c49cc68 100644
--- a/src/exchange/taler-exchange-httpd_recoup.c
+++ b/src/exchange/taler-exchange-httpd_recoup.c
@@ -212,10 +212,10 @@ recoup_transaction (void *cls,
}
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (pc->value.currency,
+ TALER_amount_set_zero (pc->value.currency,
&spent));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (pc->value.currency,
+ TALER_amount_set_zero (pc->value.currency,
&recouped));
/* Check if this coin has been recouped already at least once */
existing_recoup_found = GNUNET_NO;
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index c2fa9b1d..6007a24b 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -841,7 +841,7 @@ TEH_RESPONSE_compile_reserve_history (
{
/* did not encounter any withdraw operations, set withdraw_total to zero */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (credit_total.currency,
+ TALER_amount_set_zero (credit_total.currency,
&withdraw_total));
}
if (0 >
diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c
index 39d5bfbb..aaf28a9e 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -44,7 +44,7 @@ TALER_EXCHANGEDB_calculate_transaction_list_totals (
bool have_refund;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (spent.currency,
+ TALER_amount_set_zero (spent.currency,
&refunded));
have_refund = false;
for (struct TALER_EXCHANGEDB_TransactionList *pos = tl;
diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c
index 83d75b29..46213427 100644
--- a/src/exchangedb/test_exchangedb.c
+++ b/src/exchangedb/test_exchangedb.c
@@ -1704,7 +1704,7 @@ run (void *cls)
cbc.reserve_pub = reserve_pub;
cbc.amount_with_fee = value;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (CURRENCY, &cbc.withdraw_fee));
+ TALER_amount_set_zero (CURRENCY, &cbc.withdraw_fee));
FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
plugin->insert_withdraw_info (plugin->cls,
session,
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 8e4afe80..a1f6c7d3 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -156,7 +156,7 @@ TALER_string_to_amount_nbo (const char *str,
* #GNUNET_SYSERR if it is invalid.
*/
enum GNUNET_GenericReturnValue
-TALER_amount_get_zero (const char *cur,
+TALER_amount_set_zero (const char *cur,
struct TALER_Amount *amount);
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 82604e0b..2ad55e6c 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -58,10 +58,10 @@ TALER_EXCHANGE_parse_reserve_history (
struct TALER_Amount total_out;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (currency,
+ TALER_amount_set_zero (currency,
&total_in));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (currency,
+ TALER_amount_set_zero (currency,
&total_out));
uuid_off = 0;
for (unsigned int off = 0; off<history_length; off++)
@@ -470,10 +470,10 @@ TALER_EXCHANGE_verify_coin_history (
return GNUNET_SYSERR;
}
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (currency,
+ TALER_amount_set_zero (currency,
total));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (currency,
+ TALER_amount_set_zero (currency,
&rtotal));
for (size_t off = 0; off<len; off++)
{
diff --git a/src/lib/exchange_api_refresh_common.c b/src/lib/exchange_api_refresh_common.c
index 8ac0bdfc..00d01e4e 100644
--- a/src/lib/exchange_api_refresh_common.c
+++ b/src/lib/exchange_api_refresh_common.c
@@ -521,7 +521,7 @@ TALER_EXCHANGE_refresh_prepare (
md.melted_coin.expire_deposit
= melt_pk->expire_deposit;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (melt_amount->currency,
+ TALER_amount_set_zero (melt_amount->currency,
&total));
md.melted_coin.pub_key.rsa_public_key
= GNUNET_CRYPTO_rsa_public_key_dup (melt_pk->key.rsa_public_key);
diff --git a/src/lib/exchange_api_transfers_get.c b/src/lib/exchange_api_transfers_get.c
index 771a4c0e..a3a82368 100644
--- a/src/lib/exchange_api_transfers_get.c
+++ b/src/lib/exchange_api_transfers_get.c
@@ -113,7 +113,7 @@ check_transfers_get_response_ok (
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
- TALER_amount_get_zero (td.total_amount.currency,
+ TALER_amount_set_zero (td.total_amount.currency,
&total_expected))
{
GNUNET_break_op (0);
diff --git a/src/util/amount.c b/src/util/amount.c
index 9012788f..01f2a231 100644
--- a/src/util/amount.c
+++ b/src/util/amount.c
@@ -214,7 +214,7 @@ TALER_amount_ntoh (struct TALER_Amount *res,
enum GNUNET_GenericReturnValue
-TALER_amount_get_zero (const char *cur,
+TALER_amount_set_zero (const char *cur,
struct TALER_Amount *amount)
{
size_t slen;
@@ -371,7 +371,7 @@ TALER_amount_subtract (struct TALER_Amount *diff,
return TALER_AAR_INVALID_NEGATIVE_RESULT;
}
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (n1.currency,
+ TALER_amount_set_zero (n1.currency,
diff));
GNUNET_assert (n1.fraction >= n2.fraction);
diff->fraction = n1.fraction - n2.fraction;
@@ -414,7 +414,7 @@ TALER_amount_add (struct TALER_Amount *sum,
}
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (a1->currency,
+ TALER_amount_set_zero (a1->currency,
&res));
res.value = n1.value + n2.value;
if (res.value < n1.value)