]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Make static analyzer happier.
authorTimo Sirainen <tss@iki.fi>
Sun, 16 Jun 2013 21:03:16 +0000 (00:03 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 16 Jun 2013 21:03:16 +0000 (00:03 +0300)
src/doveadm/dsync/doveadm-dsync.c
src/doveadm/dsync/test-dsync-mailbox-tree-sync.c
src/imap-login/imap-proxy.c
src/pop3-login/pop3-proxy.c

index b8196e0063185ed4e4e10f997b05eb9412faed15..605438b929fd64e25f9ae565aeceb89255bc44f2 100644 (file)
@@ -299,6 +299,9 @@ static bool paths_are_equal(struct mail_user *user1, struct mail_user *user2,
 {
        const char *path1, *path2;
 
+       i_assert(user1->namespaces != NULL);
+       i_assert(user2->namespaces != NULL);
+
        return mailbox_list_get_root_path(user1->namespaces->list, type, &path1) &&
                mailbox_list_get_root_path(user2->namespaces->list, type, &path2) &&
                strcmp(path1, path2) == 0;
index 3d8b909084189d69d3e19d1948ec09aa2d95b764..e0fc7bf8937402ec26e002d604c4c4db5506b092 100644 (file)
@@ -624,7 +624,8 @@ static void test_dsync_mailbox_tree_sync_renames20(void)
        node_create(tree2, 3, "1/0/2", 0);
 
        test_trees_nofree(tree1, &tree2);
-       test_assert(tree1->root.first_child->next == NULL);
+       test_assert(tree1->root.first_child != NULL &&
+                   tree1->root.first_child->next == NULL);
        dsync_mailbox_tree_deinit(&tree1);
        test_end();
 }
index e283d48a1fe294e004fc0e2996ad43f851017ece..e7faebc5dbf13bf5a86e9db2e7d4fcd0ba7f01f5 100644 (file)
@@ -234,6 +234,7 @@ int imap_proxy_parse_line(struct client *client, const char *line)
                        client_proxy_failed(client, TRUE);
                        return -1;
                }
+               i_assert(ret == 0);
 
                str_truncate(str, 0);
                base64_encode(data, data_len, str);
index dd5c7dc9662d032dfcde41369965c514d6c78557..b2daa4719dd9ab876758232ed592ca279475cbe3 100644 (file)
@@ -110,6 +110,7 @@ pop3_proxy_continue_sasl_auth(struct client *client, struct ostream *output,
                        error));
                return -1;
        }
+       i_assert(ret == 0);
 
        str_truncate(str, 0);
        base64_encode(data, data_len, str);