]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
test: lib: Check o_stream_flush return value in proxy test
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 17 Mar 2017 08:21:25 +0000 (10:21 +0200)
committerGitLab <gitlab@git.dovecot.net>
Thu, 30 Mar 2017 17:26:17 +0000 (20:26 +0300)
Makes static analyzers happier

src/lib/test-iostream-proxy.c

index f212bee2a6458d22e058633dc8ee4e1b0e2eaa2e..e23a6f680545f4092a56b6444b685c47ffcadf57 100644 (file)
@@ -66,7 +66,7 @@ void test_iostream_proxy_simple(void)
 
        test_assert(proxy != NULL);
        test_assert(o_stream_send_str(left_out, "hello, world") > 0);
-       o_stream_flush(left_out);
+       test_assert(o_stream_flush(left_out) > 0);
        o_stream_unref(&left_out);
        test_assert(shutdown(sfdl[0], SHUT_WR) == 0);
 
@@ -78,7 +78,7 @@ void test_iostream_proxy_simple(void)
        i_stream_skip(right_in, bytes);
 
        test_assert(o_stream_send_str(right_out, "hello, world") > 0);
-       o_stream_flush(right_out);
+       test_assert(o_stream_flush(right_out) > 0);
        o_stream_unref(&right_out);
        test_assert(shutdown(sfdr[0], SHUT_WR) == 0);