[evolution] mail_parser_run(): Eliminate a dead code branch.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] mail_parser_run(): Eliminate a dead code branch.
- Date: Tue, 4 Dec 2012 18:14:06 +0000 (UTC)
commit 0862979d137ca489c478c970cbcfda0209abd438
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Dec 4 12:01:43 2012 -0500
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.
em-format/e-mail-parser.c | 50 ++++++++++++++++++--------------------------
1 files changed, 21 insertions(+), 29 deletions(-)
---
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 608bc46..84327c8 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]