]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail-storage-list-index-rebuild - Don't use continue inside T_BEGIN...
authorMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Wed, 19 Oct 2022 06:26:55 +0000 (09:26 +0300)
committerMarkus Valentin <markus.valentin@open-xchange.com>
Thu, 20 Oct 2022 08:58:40 +0000 (10:58 +0200)
Coverity doesn't like using continue there.

src/lib-storage/list/mail-storage-list-index-rebuild.c

index 0526be8c75b62284d55768409498d491a93c2f5b..c55cf82afc3c526be61947ad59953942efb3ad85 100644 (file)
@@ -173,16 +173,18 @@ mail_storage_list_index_fill_storage_mailboxes(struct mail_storage_list_index_re
                                       ctx->storage->event, path,
                                       FS_ITER_FLAG_DIRS | FS_ITER_FLAG_NOCACHE);
        while ((fname = fs_iter_next(iter)) != NULL) T_BEGIN {
-               if (guid_128_from_string(fname, guid) < 0)
-                       continue;
-               box = p_new(ctx->pool, struct mail_storage_list_index_rebuild_mailbox, 1);
-               guid_128_copy(box->guid, guid);
-               e_debug(ctx->storage->event, "Found GUID '%s' from storage %s",
-                       guid_128_to_string(guid), path);
-               char *hk = p_strdup_printf(ctx->pool, "%s%s", list->ns->prefix,
-                                          guid_128_to_string(guid));
-               box->list = list;
-               hash_table_update(ctx->mailboxes, hk, box);
+               if (guid_128_from_string(fname, guid) == 0) {
+                       box = p_new(ctx->pool, struct mail_storage_list_index_rebuild_mailbox, 1);
+                       guid_128_copy(box->guid, guid);
+                       e_debug(ctx->storage->event,
+                               "Found GUID '%s' from storage %s",
+                               guid_128_to_string(guid), path);
+                       char *hk = p_strdup_printf(ctx->pool, "%s%s",
+                                                  list->ns->prefix,
+                                                  guid_128_to_string(guid));
+                       box->list = list;
+                       hash_table_update(ctx->mailboxes, hk, box);
+               }
        } T_END;
 
        if (fs_iter_deinit(&iter, &error) < 0) {