commit 5e3c911e846e918637e325dbaa62253fbf0fdb65
parent 2463cab6093f523d9d1d4b505ba99e7aa09fa1f0
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 2 Aug 2026 22:20:04 +0200
improve thread-safety; not used right now, but costs little and more defensive
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/product_sold_serialize.c b/src/util/product_sold_serialize.c
@@ -37,7 +37,7 @@
static const char *
quantity_to_string (const struct TALER_MERCHANT_ProductQuantity *q)
{
- static char res[64];
+ static GNUNET_THREAD_LOCAL char res[64];
TALER_MERCHANT_vk_format_fractional_string (TALER_MERCHANT_VK_QUANTITY,
q->integer,
diff --git a/src/util/value_kinds.c b/src/util/value_kinds.c
@@ -127,7 +127,7 @@ TALER_MERCHANT_vk_process_quantity_inputs (enum TALER_MERCHANT_ValueKind kind,
uint32_t *frac_out,
const char **error_param)
{
- static char errbuf[128];
+ static GNUNET_THREAD_LOCAL char errbuf[128];
int64_t parsed_int = 0;
uint32_t parsed_frac = 0;
const char *int_field = (TALER_MERCHANT_VK_STOCK == kind)