From: Marco Bettini Date: Mon, 20 Mar 2023 08:43:05 +0000 (+0000) Subject: lib-storage: Check return status from mailbox_create() in tests X-Git-Tag: 2.4.0~2914 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41aebd3f159719d8fc0bd39a0ba6f5efca9dc274;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Check return status from mailbox_create() in tests This addresses Coverity complaints. --- diff --git a/src/lib-storage/test-mail.c b/src/lib-storage/test-mail.c index 204d05edab..fff9997051 100644 --- a/src/lib-storage/test-mail.c +++ b/src/lib-storage/test-mail.c @@ -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);