diff options
Diffstat (limited to 'src/util/amount.c')
-rw-r--r-- | src/util/amount.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/amount.c b/src/util/amount.c index 01f2a231..ae9ae652 100644 --- a/src/util/amount.c +++ b/src/util/amount.c @@ -241,6 +241,18 @@ TALER_amount_is_valid (const struct TALER_Amount *amount) } +bool +TALER_amount_is_zero (const struct TALER_Amount *amount) +{ + if (GNUNET_OK != + TALER_amount_is_valid (amount)) + return false; + return + (0 == amount->value) && + (0 == amount->fraction); +} + + /** * Test if @a a is valid, NBO variant. * |