Commit 0862979d authored by Matthew Barnes's avatar Matthew Barnes
Browse files

mail_parser_run(): Eliminate a dead code branch.

There's no need to check whether the 'parsers' GQueue is NULL since we
assert that it's non-NULL just a few lines above.
parent dff6f5d8
......@@ -82,37 +82,29 @@ mail_parser_run (EMailParser *parser,
part_id = g_string_new (".message");
parts = NULL;
if (!parsers) {
parts = e_mail_parser_wrap_as_attachment (
parser, CAMEL_MIME_PART (message),
NULL, part_id, cancellable);
} else {
for (iter = parsers->head; iter; iter = iter->next) {
EMailParserExtension *extension;
for (iter = parsers->head; iter; iter = iter->next) {
if (g_cancellable_is_cancelled (cancellable))
break;
EMailParserExtension *extension;
extension = iter->data;
if (!extension)
continue;
if (g_cancellable_is_cancelled (cancellable))
break;
parts = e_mail_parser_extension_parse (
extension, parser, CAMEL_MIME_PART (message),
part_id, cancellable);
extension = iter->data;
if (!extension)
continue;
if (parts != NULL)
break;
}
parts = e_mail_parser_extension_parse (
extension, parser, CAMEL_MIME_PART (message),
part_id, cancellable);
parts = g_slist_prepend (
parts,
e_mail_part_new (
CAMEL_MIME_PART (message),
".message"));
if (parts != NULL)
break;
}
parts = g_slist_prepend (
parts,
e_mail_part_new (CAMEL_MIME_PART (message), ".message"));
g_string_free (part_id, TRUE);
return parts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment