diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-reader-utils.c | 22 | ||||
-rw-r--r-- | mail/em-utils.c | 15 |
2 files changed, 19 insertions, 18 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 9ef55e022e..f495c664a1 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -1393,20 +1393,20 @@ e_mail_reader_reply_to_message (EMailReader *reader, while (!g_queue_is_empty (&queue)) { EMailPart *part = g_queue_pop_head (&queue); + GList *head, *link; - if (part->validities) { - GSList *viter; + head = g_queue_peek_head_link (&part->validities); - for (viter = part->validities; viter; viter = viter->next) { - EMailPartValidityPair *vpair = viter->data; + for (link = head; link != NULL; link = g_list_next (link)) { + EMailPartValidityPair *vpair = link->data; - if (vpair) { - if ((vpair->validity_type & E_MAIL_PART_VALIDITY_PGP) != 0) - validity_pgp_sum |= vpair->validity_type; - if ((vpair->validity_type & E_MAIL_PART_VALIDITY_SMIME) != 0) - validity_smime_sum |= vpair->validity_type; - } - } + if (vpair == NULL) + continue; + + if ((vpair->validity_type & E_MAIL_PART_VALIDITY_PGP) != 0) + validity_pgp_sum |= vpair->validity_type; + if ((vpair->validity_type & E_MAIL_PART_VALIDITY_SMIME) != 0) + validity_smime_sum |= vpair->validity_type; } e_mail_part_unref (part); diff --git a/mail/em-utils.c b/mail/em-utils.c index 011b49b883..470020415c 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1304,6 +1304,7 @@ em_utils_message_to_html (CamelSession *session, for (link = head; link != NULL; link = g_list_next (link)) { EMailPart *part = link->data; + GList *vhead, *vlink; /* prefer-plain can hide HTML parts, even when it's the only * text part in the email, thus show it (and hide again later) */ @@ -1315,15 +1316,15 @@ em_utils_message_to_html (CamelSession *session, hidden_text_html_part = part; } - if (part->validities) { - GSList *lst; + vhead = g_queue_peek_head_link (&part->validities); - for (lst = part->validities; lst; lst = lst->next) { - EMailPartValidityPair *pair = lst->data; + for (vlink = vhead; vlink != NULL; vlink = g_list_next (vlink)) { + EMailPartValidityPair *pair = vlink->data; - if (pair) - is_validity_found |= pair->validity_type; - } + if (pair == NULL) + continue; + + is_validity_found |= pair->validity_type; } } |