From 64e5489864c6bdc227ca97b53faed0ace496891d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 30 Apr 2026 08:21:33 +0200 Subject: [PATCH] CLEANUP: net_helper: fix incorrect const pointers in writev_n16() It's interesting to see that output pointers p1 and p2 were declared as const, and that thisremained unnoticed due to the explicit casts to u8 when writing to them. The function is currently not used, but better clean it up to avoid surprises. --- include/haproxy/net_helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/net_helper.h b/include/haproxy/net_helper.h index ee27ed483..3e74e48e7 100644 --- a/include/haproxy/net_helper.h +++ b/include/haproxy/net_helper.h @@ -360,7 +360,7 @@ static inline uint16_t readv_n16(const void *p1, size_t s1, const void *p2) * . may be zero and may be larger than the type. The caller is always * responsible for providing enough room. */ -static inline void writev_n16(const void *p1, size_t s1, const void *p2, const uint16_t u16) +static inline void writev_n16(void *p1, size_t s1, void *p2, const uint16_t u16) { if (unlikely(s1 < 2)) { if (s1 == 0)