diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-12-19 14:49:49 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-12-19 14:49:49 +0100 |
commit | 4513cde0df916550c5c6f40d272eb370778f18f3 (patch) | |
tree | bff2edfab21dc510a8c51b08dea9042da401ba66 /src/bank-lib | |
parent | 373673352fbbddebdba3dc0b83da5dc0f2cbfd29 (diff) |
-be more strict about 200 vs. 204
Diffstat (limited to 'src/bank-lib')
-rw-r--r-- | src/bank-lib/bank_api_credit.c | 5 | ||||
-rw-r--r-- | src/bank-lib/bank_api_debit.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/bank-lib/bank_api_credit.c b/src/bank-lib/bank_api_credit.c index 127ae057d..cc5e66879 100644 --- a/src/bank-lib/bank_api_credit.c +++ b/src/bank-lib/bank_api_credit.c @@ -97,9 +97,10 @@ parse_account_history (struct TALER_BANK_CreditHistoryHandle *hh, } { size_t len = json_array_size (history_array); - struct TALER_BANK_CreditDetails cd[len]; + struct TALER_BANK_CreditDetails cd[GNUNET_NZL (len)]; - for (unsigned int i = 0; i<json_array_size (history_array); i++) + GNUNET_break_op (0 != len); + for (size_t i = 0; i<len; i++) { struct TALER_BANK_CreditDetails *td = &cd[i]; struct GNUNET_JSON_Specification hist_spec[] = { diff --git a/src/bank-lib/bank_api_debit.c b/src/bank-lib/bank_api_debit.c index 6642dda81..872443209 100644 --- a/src/bank-lib/bank_api_debit.c +++ b/src/bank-lib/bank_api_debit.c @@ -97,8 +97,9 @@ parse_account_history (struct TALER_BANK_DebitHistoryHandle *hh, } { size_t len = json_array_size (history_array); - struct TALER_BANK_DebitDetails dd[len]; + struct TALER_BANK_DebitDetails dd[GNUNET_NZL (len)]; + GNUNET_break_op (0 != len); for (unsigned int i = 0; i<len; i++) { struct TALER_BANK_DebitDetails *td = &dd[i]; |