From d46b5b94f09ffbb442bb29dbbfb4122e490df728 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 30 May 2022 16:27:48 +0200 Subject: [PATCH] BUILD: htx: use the unchecked version of htx_get_head_blk() where needed stream.c and mux_fcgi.c may cause a warning for a possible NULL deref at -Os, while that is not possible thanks to the previous test. Let's just switch to __htx_get_head_blk() instead. --- src/mux_fcgi.c | 2 +- src/stream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index 26240cf94..bb9ec5667 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -462,7 +462,7 @@ static void fcgi_trace(enum trace_level level, uint64_t mask, const struct trace /* Display status-line if possible (verbosity > MINIMAL) */ if (src->verbosity > FCGI_VERB_MINIMAL && htx && htx_nbblks(htx)) { - const struct htx_blk *blk = htx_get_head_blk(htx); + const struct htx_blk *blk = __htx_get_head_blk(htx); const struct htx_sl *sl = htx_get_blk_ptr(htx, blk); enum htx_blk_type type = htx_get_blk_type(blk); diff --git a/src/stream.c b/src/stream.c index e20ac9867..f3f776db6 100644 --- a/src/stream.c +++ b/src/stream.c @@ -187,7 +187,7 @@ static void strm_trace(enum trace_level level, uint64_t mask, const struct trace /* If msg defined, display status-line if possible (verbosity > MINIMAL) */ if (src->verbosity > STRM_VERB_MINIMAL && htx && htx_nbblks(htx)) { - const struct htx_blk *blk = htx_get_head_blk(htx); + const struct htx_blk *blk = __htx_get_head_blk(htx); const struct htx_sl *sl = htx_get_blk_ptr(htx, blk); enum htx_blk_type type = htx_get_blk_type(blk);