From 801d028790bd306247373d1a7bd1c5f289980064 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Fri, 3 Apr 2026 23:29:01 +0200 Subject: [PATCH] CLEANUP: http_fetch: Use local `unique_id` variable in `smp_fetch_uniqueid()` Instead of relying on the implementation detail that `stream_generate_unique_id()` will store the unique ID in `strm->unique_id` we should use the returned value, especially since that one is already checked in the `isttest()`. Reviewed-by: Volker Dusch --- src/http_fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/http_fetch.c b/src/http_fetch.c index c4aceaf3b..e49c8bb71 100644 --- a/src/http_fetch.c +++ b/src/http_fetch.c @@ -515,8 +515,8 @@ static int smp_fetch_uniqueid(const struct arg *args, struct sample *smp, const if (!isttest(unique_id)) return 0; - smp->data.u.str.area = smp->strm->unique_id.ptr; - smp->data.u.str.data = smp->strm->unique_id.len; + smp->data.u.str.area = istptr(unique_id); + smp->data.u.str.data = istlen(unique_id); smp->data.type = SMP_T_STR; smp->flags = SMP_F_CONST; return 1;