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 01f2a2313..ae9ae652e 100644 --- a/src/util/amount.c +++ b/src/util/amount.c | |||
@@ -241,6 +241,18 @@ TALER_amount_is_valid (const struct TALER_Amount *amount) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
244 | bool | ||
245 | TALER_amount_is_zero (const struct TALER_Amount *amount) | ||
246 | { | ||
247 | if (GNUNET_OK != | ||
248 | TALER_amount_is_valid (amount)) | ||
249 | return false; | ||
250 | return | ||
251 | (0 == amount->value) && | ||
252 | (0 == amount->fraction); | ||
253 | } | ||
254 | |||
255 | |||
244 | /** | 256 | /** |
245 | * Test if @a a is valid, NBO variant. | 257 | * Test if @a a is valid, NBO variant. |
246 | * | 258 | * |