From: Willy Tarreau Date: Thu, 20 Sep 2018 09:01:01 +0000 (+0200) Subject: BUILD: stats: remove build warnings on potential null-derefs X-Git-Tag: v1.9-dev3~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21ff2c46b76abc0ee173a489bdb4dfcc384995a2;p=thirdparty%2Fhaproxy.git 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. --- 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;