]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: htx: use ASSUME_NONNULL() to mark the start line as non-null
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 13:24:28 +0000 (14:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 16:47:57 +0000 (17:47 +0100)
In http_replace_req_uri(), this assumption was previously made using
ALREADY_CHECKED() but the new one is cleaner (and smaller, 24 bytes
less).

src/http_htx.c

index 1e0e94066798eb034a420cfb18bdcdaa2cae7de3..fbadb1014b00c787f90ddf0c6f77ef701e5139fe 100644 (file)
@@ -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))