X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Ffrontend%2Fconnection_test.c;h=11a93a24fbafeb8b495549a9a89b4c56c7aecc2e;hp=b4cc1878555198425a44e7b3bb4abe9acd691de5;hb=9097c9c3259b2943dc0088b250ec871172025303;hpb=1d64c3e4ee0184ba0639b46512286c6cca5dcd4d diff --git a/t/unit/frontend/connection_test.c b/t/unit/frontend/connection_test.c index b4cc187..11a93a2 100644 --- a/t/unit/frontend/connection_test.c +++ b/t/unit/frontend/connection_test.c @@ -36,7 +36,6 @@ #include "utils/strbuf.h" -#include #include #include @@ -72,13 +71,13 @@ mock_conn_destroy(sdb_conn_t *conn) static ssize_t mock_conn_read(sdb_conn_t *conn, size_t len) { - return sdb_strbuf_read(conn->buf, conn->fd, len); + return sdb_strbuf_read(conn->buf, conn->fd, len); } /* conn_read */ static ssize_t mock_conn_write(sdb_conn_t *conn, const void *buf, size_t len) { - return sdb_write(conn->fd, len, buf); + return sdb_write(conn->fd, len, buf); } /* conn_write */ static sdb_conn_t * @@ -118,7 +117,7 @@ mock_conn_create(void) conn->write = mock_conn_write; conn->username = strdup(username); - assert(conn->username); + ck_assert(conn->username != NULL); conn->cmd = SDB_CONNECTION_IDLE; conn->cmd_len = 0; @@ -441,7 +440,6 @@ TEST_MAIN("frontend::connection") TCase *tc; char *tmp = sdb_get_current_user(); - assert(tmp); strcpy(username, tmp); free(tmp);