/* check that we have correct decryption key */
dcrypt_openssl_private_to_public_key(dec_key, &pubkey);
if (!dcrypt_openssl_public_key_id(pubkey, "sha256", data, error_r)) {
- if (pubkey != NULL) dcrypt_openssl_unref_public_key(&pubkey);
+ dcrypt_openssl_unref_public_key(&pubkey);
return FALSE;
}
ctx->failed = TRUE;
}
if (mdata->output != dbox_output) {
- if (mdata->output != NULL) {
- /* e.g. zlib plugin had changed this */
- o_stream_ref(dbox_output);
- o_stream_destroy(&mdata->output);
- mdata->output = dbox_output;
- } else {
- i_assert(ctx->failed);
- }
+ /* e.g. zlib plugin had changed this */
+ o_stream_ref(dbox_output);
+ o_stream_destroy(&mdata->output);
+ mdata->output = dbox_output;
}
index_mail_cache_parse_deinit(ctx->ctx.dest_mail,
ctx->ctx.data.received_date,
enum mailbox_list_iter_flags flags)
{
struct mailbox_list_iterate_context *ctx;
- int ret = 0;
i_assert(*patterns != NULL);
if ((flags & (MAILBOX_LIST_ITER_SELECT_SUBSCRIBED |
MAILBOX_LIST_ITER_RETURN_SUBSCRIBED)) != 0) {
- ret = mailbox_list_iter_subscriptions_refresh(list);
- if (ret < 0)
+ if (mailbox_list_iter_subscriptions_refresh(list) < 0)
return &mailbox_list_iter_failed;
}
ctx = list->v.iter_init(list, patterns, flags);
- if (ret < 0)
- ctx->failed = TRUE;
- else if ((flags & MAILBOX_LIST_ITER_NO_AUTO_BOXES) == 0)
+ if ((flags & MAILBOX_LIST_ITER_NO_AUTO_BOXES) == 0)
mailbox_list_iter_init_autocreate(ctx);
return ctx;
}
name++;
old_name = name;
}
- if (old_name != NULL && strlen(old_name) > MAILBOX_MAX_HIERARCHY_NAME_LENGTH) {
+ if (strlen(old_name) > MAILBOX_MAX_HIERARCHY_NAME_LENGTH) {
mail_storage_set_error(box->storage, MAIL_ERROR_PARAMS,
"Mailbox name too long");
return -1;
} else {
/* zero string length - list all root UIDs as definite
answers */
+#if 0 /* FIXME: this code is never actually reached now. */
ret = squat_uidlist_get_seqrange(trie->uidlist,
trie->root.uid_list_idx,
&ctx.tmp_uids);
squat_trie_filter_type(type, &ctx.tmp_uids,
definite_uids);
+#else
+ i_unreached();
+#endif
}
seq_range_array_remove_seq_range(maybe_uids, definite_uids);
squat_trie_add_unknown(trie, maybe_uids);