diff options
| author | Christian Grothoff <christian@grothoff.org> | 2020-03-15 20:42:47 +0100 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2020-03-15 20:42:47 +0100 | 
| commit | c898a1e13b1f06dafec35051dfd232510bd28de3 (patch) | |
| tree | 5d3bd099b02512744da3f71780da9330a97e8a2e /src/util/amount.c | |
| parent | 4322bbf2f1722b4c53114901768772dabdb7e822 (diff) | |
clean up closer logic, improve error handling, simplify logic, add comments
Diffstat (limited to 'src/util/amount.c')
| -rw-r--r-- | src/util/amount.c | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/amount.c b/src/util/amount.c index e443a0d2..fb5a41d7 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -709,6 +709,13 @@ int  TALER_amount_round_down (struct TALER_Amount *amount,                           const struct TALER_Amount *round_unit)  { +  if (GNUNET_OK != +      TALER_amount_cmp_currency (amount, +                                 round_unit)) +  { +    GNUNET_break (0); +    return GNUNET_SYSERR; +  }    if ( (0 != round_unit->fraction) &&         (0 != round_unit->value) )    {  | 
