From: Zero King Date: Wed, 24 Jul 2019 17:24:32 +0000 (+0000) Subject: Remove duplicate conditional expressions X-Git-Tag: 2019-10-25~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dba0d1b5f61081ac848ed19b13eb7761ff9ed73a;p=neomutt Remove duplicate conditional expressions --- diff --git a/email/parse.c b/email/parse.c index ccb88ec4d..6607ede52 100644 --- a/email/parse.c +++ b/email/parse.c @@ -73,7 +73,7 @@ void mutt_auto_subscribe(const char *mailto) if ((mutt_parse_mailto(lpenv, NULL, mailto) != -1) && !TAILQ_EMPTY(&lpenv->to)) { const char *mailbox = TAILQ_FIRST(&lpenv->to)->mailbox; - if (mailbox && !mutt_regexlist_match(&UnSubscribedLists, mailbox) && + if (mailbox && !mutt_regexlist_match(&SubscribedLists, mailbox) && !mutt_regexlist_match(&UnMailLists, mailbox) && !mutt_regexlist_match(&UnSubscribedLists, mailbox)) { diff --git a/mutt/charset.c b/mutt/charset.c index d1e5a328e..7b4ff6186 100644 --- a/mutt/charset.c +++ b/mutt/charset.c @@ -345,8 +345,7 @@ void mutt_ch_canonical_charset(char *buf, size_t buflen, const char *name) for (size_t i = 0; PreferredMimeNames[i].key; i++) { - if ((mutt_str_strcasecmp(scratch, PreferredMimeNames[i].key) == 0) || - (mutt_str_strcasecmp(scratch, PreferredMimeNames[i].key) == 0)) + if (mutt_str_strcasecmp(scratch, PreferredMimeNames[i].key) == 0) { mutt_str_strfcpy(buf, PreferredMimeNames[i].pref, buflen); goto out; diff --git a/sendlib.c b/sendlib.c index 7c0cd6db4..33ef9b974 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1154,8 +1154,7 @@ enum ContentType mutt_lookup_mime_type(struct Body *att, const char *path) { sze = mutt_str_strlen(p); if ((sze > cur_sze) && (szf >= sze) && - ((mutt_str_strcasecmp(path + szf - sze, p) == 0) || - (mutt_str_strcasecmp(path + szf - sze, p) == 0)) && + (mutt_str_strcasecmp(path + szf - sze, p) == 0) && ((szf == sze) || (path[szf - sze - 1] == '.'))) { /* get the content-type */