MINOR: htx: add an unchecked version of htx_get_head_blk()
authorWilly Tarreau <w@1wt.eu>
Mon, 30 May 2022 14:25:16 +0000 (16:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 May 2022 14:25:16 +0000 (16:25 +0200)
commit771483da3e60545a4d2da02ea843774822f1d315
treeb4ada5d8e2b6589fe4801ae0a3479dfcec4d6ca0
parent8e9f915f8f8fff2685da28e6c06e1285a1c6293a
MINOR: htx: add an unchecked version of htx_get_head_blk()

htx_get_head_blk() is used at plenty of places, many of which are known
to be safe, but the function checks for the presence of a first block
and returns NULL if it doesn't exist. While it's properly used, it makes
compilers complain at -Os on stream.c and mux_fcgi.c because they probably
don't propagate variables far enough to see that there's no risk.

Let's add an unchecked version for these use cases.
include/haproxy/htx.h