summaryrefslogtreecommitdiff
path: root/src/mint-tools
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-01 10:06:46 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-01 10:06:46 +0200
commitad237521e982352d41127f8c19576a5a242dbbbd (patch)
tree0745921f6f20400c1dfa7e48f4fbbc6725f844e6 /src/mint-tools
parent66355c18c859b92cf7743dbeb7e5835506ae99a7 (diff)
downloadexchange-ad237521e982352d41127f8c19576a5a242dbbbd.tar.gz
exchange-ad237521e982352d41127f8c19576a5a242dbbbd.tar.bz2
exchange-ad237521e982352d41127f8c19576a5a242dbbbd.zip
check return values
Diffstat (limited to 'src/mint-tools')
-rw-r--r--src/mint-tools/taler-mint-reservemod.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mint-tools/taler-mint-reservemod.c b/src/mint-tools/taler-mint-reservemod.c
index ce35ecc4c..762830783 100644
--- a/src/mint-tools/taler-mint-reservemod.c
+++ b/src/mint-tools/taler-mint-reservemod.c
@@ -162,9 +162,15 @@ reservemod_add (struct TALER_Amount denom)
"balance_fraction",
"balance_currency",
&old_denom));
- TALER_amount_add (&new_denom,
- &old_denom,
- &denom);
+ if (GNUNET_OK !=
+ TALER_amount_add (&new_denom,
+ &old_denom,
+ &denom))
+ {
+ fprintf (stderr,
+ "Integer overflow when computing new balance!\n");
+ return GNUNET_SYSERR;
+ }
TALER_amount_hton (&new_denom_nbo,
&new_denom);
result = PQexecParams (db_conn,