]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: hlua: use ASSUME_NONNULL() instead of ALREADY_CHECKED()
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 13:22:13 +0000 (14:22 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Dec 2024 16:47:57 +0000 (17:47 +0100)
The purpose of the test in hlua_applet_tcp_new() was precisely to
declare non-nullity. Let's just do it using ASSUME_NONNULL() now.

src/hlua.c

index a83fb758f852887dcdf9f5e8529e81e4c2d6ace5..5e70e2bc7e24a7cbb2c4483a0e95f48f6f4f1693 100644 (file)
@@ -5064,10 +5064,9 @@ __LJMP static struct hlua_appctx *hlua_checkapplet_tcp(lua_State *L, int ud)
 static int hlua_applet_tcp_new(lua_State *L, struct appctx *ctx)
 {
        struct hlua_appctx *luactx;
-       struct stream *s = appctx_strm(ctx);
+       struct stream *s = ASSUME_NONNULL(appctx_strm(ctx));
        struct proxy *p;
 
-       ALREADY_CHECKED(s);
        p = s->be;
 
        /* Check stack size. */