]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: channel: remove bogus and unused definition of channel_empty()
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 13:30:09 +0000 (15:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 14:04:19 +0000 (16:04 +0200)
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

index 6dfb6c80e0ba3928da8f03204266844ba71ebda9..b76783e5af46316e8ad42c22718fbf2631020448 100644 (file)
@@ -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
  */