summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/merchant_api_get_orders.c2
-rw-r--r--src/lib/merchant_api_get_products.c2
-rw-r--r--src/lib/merchant_api_merchant_get_order.c6
-rw-r--r--src/testing/testing_api_cmd_post_instances.c6
-rw-r--r--src/testing/testing_api_cmd_testserver.c12
5 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/merchant_api_get_orders.c b/src/lib/merchant_api_get_orders.c
index 7f08acb6..0a0ba3f0 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -76,7 +76,7 @@ parse_orders (const json_t *ia,
struct TALER_MERCHANT_OrdersGetHandle *ogh)
{
unsigned int oes_len = json_array_size (ia);
- struct TALER_MERCHANT_OrderEntry oes[oes_len];
+ struct TALER_MERCHANT_OrderEntry oes[GNUNET_NZL (oes_len)];
size_t index;
json_t *value;
int ret;
diff --git a/src/lib/merchant_api_get_products.c b/src/lib/merchant_api_get_products.c
index ce26b496..d13faf2d 100644
--- a/src/lib/merchant_api_get_products.c
+++ b/src/lib/merchant_api_get_products.c
@@ -78,7 +78,7 @@ parse_products (const json_t *json,
struct TALER_MERCHANT_ProductsGetHandle *pgh)
{
unsigned int ies_len = json_array_size (ia);
- struct TALER_MERCHANT_InventoryEntry ies[ies_len];
+ struct TALER_MERCHANT_InventoryEntry ies[GNUNET_NZL (ies_len)];
size_t index;
json_t *value;
enum GNUNET_GenericReturnValue ret;
diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c
index 0e6b53bf..68631bde 100644
--- a/src/lib/merchant_api_merchant_get_order.c
+++ b/src/lib/merchant_api_merchant_get_order.c
@@ -231,9 +231,9 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
unsigned int wts_len = json_array_size (wire_details);
unsigned int wrs_len = json_array_size (wire_reports);
unsigned int ref_len = json_array_size (refund_details);
- struct TALER_MERCHANT_WireTransfer wts[wts_len];
- struct TALER_MERCHANT_WireReport wrs[wrs_len];
- struct TALER_MERCHANT_RefundOrderDetail ref[ref_len];
+ struct TALER_MERCHANT_WireTransfer wts[GNUNET_NZL (wts_len)];
+ struct TALER_MERCHANT_WireReport wrs[GNUNET_NZL (wrs_len)];
+ struct TALER_MERCHANT_RefundOrderDetail ref[GNUNET_NZL (ref_len)];
for (unsigned int i = 0; i<wts_len; i++)
{
diff --git a/src/testing/testing_api_cmd_post_instances.c b/src/testing/testing_api_cmd_post_instances.c
index 4938f6c0..411063af 100644
--- a/src/testing/testing_api_cmd_post_instances.c
+++ b/src/testing/testing_api_cmd_post_instances.c
@@ -322,9 +322,9 @@ TALER_TESTING_cmd_merchant_post_instances2 (
pis->payto_uris_length = payto_uris_length;
pis->payto_uris = GNUNET_new_array (payto_uris_length,
const char *);
- memcpy (pis->payto_uris,
- payto_uris,
- sizeof (const char *) * payto_uris_length);
+ GNUNET_memcpy (pis->payto_uris,
+ payto_uris,
+ sizeof (const char *) * payto_uris_length);
pis->name = name;
pis->address = address; /* ownership transfer! */
pis->jurisdiction = jurisdiction; /* ownership transfer! */
diff --git a/src/testing/testing_api_cmd_testserver.c b/src/testing/testing_api_cmd_testserver.c
index e80dcd78..f3a0cb4f 100644
--- a/src/testing/testing_api_cmd_testserver.c
+++ b/src/testing/testing_api_cmd_testserver.c
@@ -195,13 +195,13 @@ handler_cb (void *cls,
void *body;
body = GNUNET_malloc (rc->body_size + *upload_data_size);
- memcpy (body,
- rc->body,
- rc->body_size);
+ GNUNET_memcpy (body,
+ rc->body,
+ rc->body_size);
GNUNET_free (rc->body);
- memcpy (body + rc->body_size,
- upload_data,
- *upload_data_size);
+ GNUNET_memcpy (body + rc->body_size,
+ upload_data,
+ *upload_data_size);
rc->body = body;
rc->body_size += *upload_data_size;
*upload_data_size = 0;