aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-05 01:01:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-05 01:01:43 +0800
commit0862979d137ca489c478c970cbcfda0209abd438 (patch)
treec40c8c28c9f244e09d9bca85271c120ca9fc5489
parentdff6f5d85df957e2d0a58513977606bd9490d989 (diff)
downloadgsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar.gz
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar.bz2
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar.lz
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar.xz
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.tar.zst
gsoc2013-evolution-0862979d137ca489c478c970cbcfda0209abd438.zip
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.
-rw-r--r--em-format/e-mail-parser.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 608bc467da..84327c8559 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -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;