]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
test: lib-program-client: Ignore some return values in test server
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 17 Mar 2017 08:23:14 +0000 (10:23 +0200)
committerGitLab <gitlab@git.dovecot.net>
Thu, 30 Mar 2017 17:26:17 +0000 (20:26 +0300)
Makes static analyzers happier

src/lib-program-client/test-program-client-net.c

index 610d30d69dd9315f02d1fbb8fec5d07f2d9e88a3..7b21619e85b6ae208069265ae312c3a28804af1a 100644 (file)
@@ -182,7 +182,7 @@ void test_program_run(struct test_client *client)
                        } else if (strcmp(args[0], "test_program_io")==0) {
                                os = o_stream_create_dot(client->out, FALSE);
                                o_stream_send_istream(os, client->body);
-                               o_stream_flush(os);
+                               test_assert(o_stream_flush(os) > 0);
                                o_stream_unref(&os);
                                o_stream_nsend_str(client->out, "+\n");
                        } else if (strcmp(args[0], "test_program_failure")==0) {
@@ -262,7 +262,7 @@ void test_program_setup(void) {
        /* create listener */
        struct ip_addr ip;
        test_globals.port = rand() % 64510 + 1024;
-       net_addr2ip("127.0.0.1", &ip);
+       test_assert(net_addr2ip("127.0.0.1", &ip) == 0);
 
        test_globals.listen_fd = net_listen(&ip, &test_globals.port, 1);