]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
tests/tcp: mute Coverity
authorDaniel Salzman <daniel.salzman@nic.cz>
Wed, 23 Mar 2022 07:42:46 +0000 (08:42 +0100)
committerDaniel Salzman <daniel.salzman@nic.cz>
Wed, 23 Mar 2022 07:42:46 +0000 (08:42 +0100)
tests/libknot/test_xdp_tcp.c

index e4d9b875acfaaab35c466d728854e9b3ff8a9051..03f098a4174260493713e56fa0c4d0fa070d0da7 100644 (file)
@@ -371,6 +371,7 @@ void test_close(void)
        is_int(KNOT_EOK, ret, "close: send OK");
        check_sent(0, 0, 0, 1);
        is_int(XDP_TCP_CLOSE, rl.action, "close: relay action");
+       assert(rl.conn);
        ok(rl.conn == test_conn, "close: same connection");
        is_int(XDP_TCP_CLOSING2, rl.conn->state, "close: conn state");
 
@@ -535,6 +536,7 @@ void test_obufs(void)
        size_t TEST_MSS = 1111;
        size_t DATA_LEN = 65535; // with 2-byte len prefix, this is > 64k == window_size
        uint8_t *data = calloc(DATA_LEN, 1);
+       assert(rl.conn);
        rl.conn->mss = TEST_MSS;
        rl.conn->window_size = 65536;
        send2_mss = TEST_MSS;