From 21ff2c46b76abc0ee173a489bdb4dfcc384995a2 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 20 Sep 2018 11:01:01 +0200 Subject: [PATCH] BUILD: stats: remove build warnings on potential null-derefs A couple of objt_appctx() could be replaced with their unchecked equivalent since the pointer is guaranteed and not checked there. --- src/stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stats.c b/src/stats.c index da960f5c9d..efa5c090c3 100644 --- a/src/stats.c +++ b/src/stats.c @@ -2951,7 +2951,7 @@ static int stats_send_http_headers(struct stream_interface *si) { struct stream *s = si_strm(si); struct uri_auth *uri = s->be->uri_auth; - struct appctx *appctx = objt_appctx(si->end); + struct appctx *appctx = __objt_appctx(si->end); chunk_printf(&trash, "HTTP/1.1 200 OK\r\n" @@ -2984,7 +2984,7 @@ static int stats_send_http_redirect(struct stream_interface *si) char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN]; struct stream *s = si_strm(si); struct uri_auth *uri = s->be->uri_auth; - struct appctx *appctx = objt_appctx(si->end); + struct appctx *appctx = __objt_appctx(si->end); /* scope_txt = search pattern + search query, appctx->ctx.stats.scope_len is always <= STAT_SCOPE_TXT_MAXLEN */ scope_txt[0] = 0; -- 2.47.3