]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-fcgi: use ASSUME_NONNULL() to indicate that the first block exists
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 13:26:06 +0000 (14:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 16:47:57 +0000 (17:47 +0100)
In fcgi_snd_buf(), this was previously achieved using
ALREADY_CHECKED(blk), but we can now fold it into the cleaner
ASSUME_NONNULL().

src/mux_fcgi.c

index 4c2310be472a0df6e1a8857a0dc4d895798bfe29..4adf658b55651e98002fbf5655adb8a6f2968578 100644 (file)
@@ -3994,8 +3994,7 @@ static size_t fcgi_snd_buf(struct stconn *sc, struct buffer *buf, size_t count,
 
        while (fstrm->state < FCGI_SS_HLOC && !(fstrm->flags & FCGI_SF_BLK_ANY) &&
               count && !htx_is_empty(htx)) {
-               blk = htx_get_head_blk(htx);
-               ALREADY_CHECKED(blk);
+               blk = ASSUME_NONNULL(htx_get_head_blk(htx));
                bsize = htx_get_blksz(blk);
 
                switch (htx_get_blk_type(blk)) {