From bf32667c36a2d70974e3a3dd3492617dd03276f2 Mon Sep 17 00:00:00 2001 From: Jorg K Date: Sat, 28 Sep 2019 21:45:25 +0200 Subject: [PATCH] Bug 1584473 - Fix doubled up sub-expressions in MIME and MAPI. r=aceman --- mailnews/import/outlook/src/MapiApi.cpp | 2 -- mailnews/mime/emitters/nsEmitterUtils.cpp | 25 ++++++++++------------- mailnews/mime/src/mimemsig.cpp | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/mailnews/import/outlook/src/MapiApi.cpp b/mailnews/import/outlook/src/MapiApi.cpp index 7c3b48c80f..1b0889651d 100644 --- a/mailnews/import/outlook/src/MapiApi.cpp +++ b/mailnews/import/outlook/src/MapiApi.cpp @@ -1309,8 +1309,6 @@ void CMapiApi::ReportLongProp(const char *pTag, LPSPropValue pVal) { MAPI_TRACE1("%s {NULL}\n", pTag); } else if (pVal && (PROP_TYPE(pVal->ulPropTag) == PT_ERROR)) { MAPI_TRACE1("%s {Error retrieving property}\n", pTag); - } else if (pVal && (PROP_TYPE(pVal->ulPropTag) == PT_ERROR)) { - MAPI_TRACE1("%s {Error retrieving property}\n", pTag); } else { MAPI_TRACE1("%s invalid value, expecting long\n", pTag); } diff --git a/mailnews/mime/emitters/nsEmitterUtils.cpp b/mailnews/mime/emitters/nsEmitterUtils.cpp index 465d714aca..773870dfb3 100644 --- a/mailnews/mime/emitters/nsEmitterUtils.cpp +++ b/mailnews/mime/emitters/nsEmitterUtils.cpp @@ -25,20 +25,17 @@ extern "C" bool EmitThisHeaderForPrefSetting(int32_t dispType, } if (nsMimeHeaderDisplayTypes::NormalHeaders == dispType) { - if ((!strcmp(header, HEADER_DATE)) || (!strcmp(header, HEADER_TO)) || - (!strcmp(header, HEADER_SUBJECT)) || (!strcmp(header, HEADER_SENDER)) || - (!strcmp(header, HEADER_RESENT_TO)) || - (!strcmp(header, HEADER_RESENT_SENDER)) || - (!strcmp(header, HEADER_RESENT_FROM)) || - (!strcmp(header, HEADER_RESENT_CC)) || - (!strcmp(header, HEADER_REPLY_TO)) || - (!strcmp(header, HEADER_REFERENCES)) || - (!strcmp(header, HEADER_NEWSGROUPS)) || - (!strcmp(header, HEADER_MESSAGE_ID)) || - (!strcmp(header, HEADER_FROM)) || - (!strcmp(header, HEADER_FOLLOWUP_TO)) || (!strcmp(header, HEADER_CC)) || - (!strcmp(header, HEADER_ORGANIZATION)) || - (!strcmp(header, HEADER_REPLY_TO)) || (!strcmp(header, HEADER_BCC))) + if (!strcmp(header, HEADER_DATE) || !strcmp(header, HEADER_TO) || + !strcmp(header, HEADER_SUBJECT) || !strcmp(header, HEADER_SENDER) || + !strcmp(header, HEADER_RESENT_TO) || + !strcmp(header, HEADER_RESENT_SENDER) || + !strcmp(header, HEADER_RESENT_FROM) || + !strcmp(header, HEADER_RESENT_CC) || !strcmp(header, HEADER_REPLY_TO) || + !strcmp(header, HEADER_REFERENCES) || + !strcmp(header, HEADER_NEWSGROUPS) || + !strcmp(header, HEADER_MESSAGE_ID) || !strcmp(header, HEADER_FROM) || + !strcmp(header, HEADER_FOLLOWUP_TO) || !strcmp(header, HEADER_CC) || + !strcmp(header, HEADER_ORGANIZATION) || !strcmp(header, HEADER_BCC)) return true; else return false; diff --git a/mailnews/mime/src/mimemsig.cpp b/mailnews/mime/src/mimemsig.cpp index b25ba7870e..9fa006c598 100644 --- a/mailnews/mime/src/mimemsig.cpp +++ b/mailnews/mime/src/mimemsig.cpp @@ -543,7 +543,7 @@ static int MimeMultipartSigned_emit_child(MimeObject *obj) { */ if (obj->options && obj->options->headers != MimeHeadersCitation && obj->options->write_html_p && obj->options->output_fn && - obj->options->headers != MimeHeadersCitation && sig->crypto_closure) { + sig->crypto_closure) { // Calling crypto_generate_html may trigger wanted side effects, // but we're no longer using its results. char *html = (((MimeMultipartSignedClass *)obj->clazz)