aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_post_orders.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-19 11:43:40 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-19 11:43:40 +0100
commit61c6cb27442aed0b45cf31f8a69183b1c39e9a13 (patch)
tree0bd4be7427bc0fcff3dcad24ab55480c93a03a24 /src/testing/testing_api_cmd_post_orders.c
parent39e6ebbc169a250b6ae11928f5ce58696f09f19f (diff)
downloadmerchant-61c6cb27442aed0b45cf31f8a69183b1c39e9a13.tar.gz
merchant-61c6cb27442aed0b45cf31f8a69183b1c39e9a13.tar.bz2
merchant-61c6cb27442aed0b45cf31f8a69183b1c39e9a13.zip
-fix misc bugs
Diffstat (limited to 'src/testing/testing_api_cmd_post_orders.c')
-rw-r--r--src/testing/testing_api_cmd_post_orders.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_post_orders.c b/src/testing/testing_api_cmd_post_orders.c
index 1568d151..81b79091 100644
--- a/src/testing/testing_api_cmd_post_orders.c
+++ b/src/testing/testing_api_cmd_post_orders.c
@@ -415,7 +415,6 @@ orders_run2 (void *cls,
{
struct OrdersState *ps = cls;
const json_t *order;
- json_error_t error;
char *products_string = GNUNET_strdup (ps->products);
char *locks_string = GNUNET_strdup (ps->locks);
char *token;
@@ -454,21 +453,20 @@ orders_run2 (void *cls,
// FIXME: should probably use get_monotone() to ensure uniqueness!
now = GNUNET_TIME_absolute_get ();
- order_id = GNUNET_STRINGS_data_to_string_alloc
- (&now.abs_value_us,
- sizeof (now.abs_value_us));
- json_object_set_new (ps->order_terms,
- "order_id",
- json_string (order_id));
+ order_id = GNUNET_STRINGS_data_to_string_alloc (
+ &now.abs_value_us,
+ sizeof (now.abs_value_us));
+ GNUNET_assert (0 ==
+ json_object_set_new (ps->order_terms,
+ "order_id",
+ json_string (order_id)));
GNUNET_free (order_id);
}
order = ps->order_terms;
}
if (NULL == order)
{
- // human error here.
GNUNET_break (0);
- fprintf (stderr, "%s\n", error.text);
TALER_TESTING_interpreter_fail (is);
return;
}