From: Willy Tarreau Date: Tue, 17 Dec 2024 13:24:28 +0000 (+0100) Subject: CLEANUP: htx: use ASSUME_NONNULL() to mark the start line as non-null X-Git-Tag: v3.2-dev2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=143a1036969e7d025d93c3b8bd1d1f2dcbd44c3e;p=thirdparty%2Fhaproxy.git CLEANUP: htx: use ASSUME_NONNULL() to mark the start line as non-null In http_replace_req_uri(), this assumption was previously made using ALREADY_CHECKED() but the new one is cleaner (and smaller, 24 bytes less). --- diff --git a/src/http_htx.c b/src/http_htx.c index 1e0e940667..fbadb1014b 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -388,8 +388,8 @@ int http_replace_req_uri(struct htx *htx, const struct ist uri) if (!http_replace_stline(htx, meth, uri, vsn)) goto fail; - sl = http_get_stline(htx); - ALREADY_CHECKED(sl); /* the stline exists because http_replace_stline() succeeded */ + /* the stline exists because http_replace_stline() succeeded */ + sl = ASSUME_NONNULL(http_get_stline(htx)); sl->flags &= ~HTX_SL_F_NORMALIZED_URI; if (!http_update_host(htx, sl, uri))