From: Willy Tarreau Date: Mon, 11 May 2026 13:30:09 +0000 (+0200) Subject: CLEANUP: channel: remove bogus and unused definition of channel_empty() X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=4eb6e8daa348f447f37f2f9cadca6f782955da61;p=haproxy.git 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. --- 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 */