]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
test-ostream-escaped: Check flush return value
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 6 Oct 2017 05:55:33 +0000 (08:55 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 10 Oct 2017 08:41:04 +0000 (11:41 +0300)
Found by coverity

src/lib/test-ostream-escaped.c

index 4c0e7446cff1758e8d1ddb6dece0be30e29b7ae5..0ca29fd39d5cf531a3112cd3cb918fb947b42dd5 100644 (file)
@@ -72,7 +72,7 @@ static void test_ostream_escaped_hex(void)
 
        test_begin("test_ostream_escaped_hex()");
        test_assert(o_stream_send_str(os_encode, "hello, world") == 12);
-       o_stream_flush(os_encode);
+       test_assert(o_stream_flush(os_encode) == 1);
 
        test_assert(strcmp(str_c(str), "68656c6c6f2c20776f726c64") == 0);