From bf2ce9853e640384106f4dd7c242ea1e5e440871 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 1 Sep 2021 11:11:41 +0200 Subject: add long-time overdue convenience function --- src/include/taler_amount_lib.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h index a1f6c7d35..c1f42e473 100644 --- a/src/include/taler_amount_lib.h +++ b/src/include/taler_amount_lib.h @@ -160,6 +160,17 @@ TALER_amount_set_zero (const char *cur, struct TALER_Amount *amount); +/** + * Test if the given @a amount is zero. + * + * @param amount amount to compare to zero + * @return true if the amount is zero, + * false if it is non-zero or invalid + */ +bool +TALER_amount_is_zero (const struct TALER_Amount *amount); + + /** * Test if the given amount is valid. * -- cgit v1.2.3