]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Check return status from mailbox_create() in tests
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 20 Mar 2023 08:43:05 +0000 (08:43 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 20 Mar 2023 13:16:28 +0000 (13:16 +0000)
This addresses Coverity complaints.

src/lib-storage/test-mail.c

index 204d05edab5755e8018cab336fe6273d6ad4a308..fff9997051339112cd9f4d2865cd1f5e54f1be4e 100644 (file)
@@ -599,7 +599,7 @@ static void test_mail_set_critical_different_mailboxes(void)
 
        struct mailbox *box2 =
                mailbox_alloc(ctx->user->namespaces->list, "testbox", 0);
-       mailbox_create(box2, NULL, FALSE);
+       test_assert(mailbox_create(box2, NULL, FALSE) == 0);
        test_assert(mailbox_open(box2) == 0);
        struct mailbox_transaction_context *trans2 =
                mailbox_transaction_begin(box2, 0, __func__);
@@ -630,7 +630,7 @@ static void test_mail_get_last_internal_error(void)
                mailbox_alloc(ctx->user->namespaces->list, "INBOX", 0);
        struct mailbox *box2 =
                mailbox_alloc(ctx->user->namespaces->list, "testbox", 0);
-       mailbox_create(box2, NULL, FALSE);
+       test_assert(mailbox_create(box2, NULL, FALSE) == 0);
        test_assert(mailbox_open(box1) == 0);
        test_assert(mailbox_open(box2) == 0);