check return values
This commit is contained in:
parent
66355c18c8
commit
ad237521e9
@ -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,
|
||||
|
@ -1041,7 +1041,7 @@ TMH_PARSE_amount_json (struct MHD_Connection *connection,
|
||||
amount->fraction = (uint32_t) fraction;
|
||||
GNUNET_assert (strlen (TMH_mint_currency_string) < TALER_CURRENCY_LEN);
|
||||
strcpy (amount->currency, TMH_mint_currency_string);
|
||||
TALER_amount_normalize (amount);
|
||||
(void) TALER_amount_normalize (amount);
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user