]> granicus.if.org Git - neomutt/commitdiff
Remove duplicate conditional expressions
authorZero King <l2dy@icloud.com>
Wed, 24 Jul 2019 17:24:32 +0000 (17:24 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 24 Jul 2019 21:55:35 +0000 (22:55 +0100)
email/parse.c
mutt/charset.c
sendlib.c

index ccb88ec4d2ac61cb0081d550c558a641b5131a36..6607ede52b1f564643004567a0ff8cffc688da39 100644 (file)
@@ -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))
     {
index d1e5a328e778222346beae08dfa32667e44a2a6b..7b4ff618631c8fac4f3c73de060a8760874749f8 100644 (file)
@@ -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;
index 7c0cd6db43a1cd5ccc8c6fe1bb04d4e86effe08e..33ef9b974aae699c7ff67d4610da1ca81d35d48f 100644 (file)
--- 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 */