From 4eb6e8daa348f447f37f2f9cadca6f782955da61 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 11 May 2026 15:30:09 +0200 Subject: [PATCH] CLEANUP: channel: remove bogus and unused definition of channel_empty() The function was mistakenly checking chn->flags instead of chn_strm(chn)->flags, and is not used. Better drop it before someone attempts to use it. --- include/haproxy/channel.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/haproxy/channel.h b/include/haproxy/channel.h index 6dfb6c80e..b76783e5a 100644 --- a/include/haproxy/channel.h +++ b/include/haproxy/channel.h @@ -816,12 +816,6 @@ static inline size_t channel_input_data(const struct channel *chn) return channel_data(chn) - co_data(chn); } -/* Returns 1 if the channel is empty, taking the HTX streams into account */ -static inline size_t channel_empty(const struct channel *chn) -{ - return (IS_HTX_STRM(chn) ? htx_is_empty(htxbuf(&chn->buf)) : c_empty(chn)); -} - /* Check channel's last_read date against the idle timeer to verify the producer * is still streaming data or not */ -- 2.47.3