]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-sasl: test-sasl-oauth2 - Make sure error variable is initialized
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 9 Oct 2025 22:31:31 +0000 (00:31 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 9 Oct 2025 23:37:11 +0000 (01:37 +0200)
Fix for scan-build report.

src/lib-sasl/test-sasl-oauth2.c

index c142e400ef0211c7b5c5a1224acea8ad2566f2a3..d0d581069065b4872f83f3fe66b4279323d69f09 100644 (file)
@@ -252,12 +252,11 @@ static void test_kvpair_invalid(void)
                        in = in_nul;
                }
 
-               ret = 0;
-               while (ret == 0 && in < in_end) {
+               do {
                        ret = sasl_oauth2_kvpair_parse(in, in_end - in,
                                                       &key, &value, &in,
                                                       &error);
-               }
+               } while (ret == 0 && in < in_end);
                test_out_reason("decode failure", ret < 0, error);
 
                test_end();