]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
TESTS: quic: useless param for b_quic_dec_int()
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 15 Oct 2025 07:58:03 +0000 (09:58 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 15 Oct 2025 07:58:03 +0000 (09:58 +0200)
The third parameter passed to b_quic_dec_int() is unitialized. This is not a bug.
But this disturbs coverity for an unknown reason as revealed by GH issue #3154.

This patch takes the opportunity to use NULL as passed value to avoid using such
an uneeded third parameter.

Should be backported to 3.2 where this unit test was introduced.

src/quic_enc.c

index 3dd7bd60dd7bc3c993a4c25bc07d7407d183e825..1f2d55ab972cb103f08dea9ae95b74ba3d24fa35 100644 (file)
@@ -9,7 +9,6 @@ int quic_enc_unittest(int argc, char **argv)
        uint64_t val = 0;
        struct buffer b;
        char area[12];
-       size_t len;
 
        int ret = 1;
 
@@ -20,7 +19,7 @@ int quic_enc_unittest(int argc, char **argv)
        BUG_ON(b_data(&b) != b_contig_data(&b, b_head_ofs(&b)));
 
        /* test that b_quic_dec_int() can decode a wrapping value */
-       b_quic_dec_int(&val, &b, &len);
+       b_quic_dec_int(&val, &b, NULL);
        if (val != init)
                goto out;