From 3b9d8412c09ed8d38e94b8273af9d05fb163c47c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 25 Feb 2026 15:06:27 +0100 Subject: [PATCH] clang-tidy: add more missing parentheses in macro values Reported when running `HeaderFilterRegex: '.*'` in CI. Also replace an underscored symbol with a regular one in macro definition. Cherry-picked from #20720 Closes #20721 --- lib/vquic/vquic_int.h | 2 +- lib/vtls/vtls.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vquic/vquic_int.h b/lib/vquic/vquic_int.h index d77b34d519..82bd5b0358 100644 --- a/lib/vquic/vquic_int.h +++ b/lib/vquic/vquic_int.h @@ -78,7 +78,7 @@ struct cf_quic_ctx { }; #define H3_STREAM_CTX(ctx, data) \ - (data ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL) + ((data) ? Curl_uint32_hash_get(&(ctx)->streams, (data)->mid) : NULL) CURLcode vquic_ctx_init(struct Curl_easy *data, struct cf_quic_ctx *qctx); diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index 83e2a7ca54..d21df11b4a 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -50,8 +50,8 @@ struct dynbuf; #ifdef USE_ECH #include "curlx/base64.h" -#define ECH_ENABLED(__data__) \ - (__data__->set.tls_ech && !(__data__->set.tls_ech & CURLECH_DISABLE)) +#define ECH_ENABLED(data) \ + ((data)->set.tls_ech && !((data)->set.tls_ech & CURLECH_DISABLE)) #endif /* USE_ECH */ #define ALPN_ACCEPTED "ALPN: server accepted "