]> granicus.if.org Git - neomutt/commitdiff
coverity
authorRichard Russon <rich@flatcap.org>
Fri, 19 Jan 2018 02:44:31 +0000 (02:44 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 24 Jan 2018 21:30:36 +0000 (21:30 +0000)
init.c

diff --git a/init.c b/init.c
index 5342fa579a4c3fe330e2c77c772ed63b8e072b33..9a07b84726bd0f64bd019f3908601ee80b0cdad7 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2454,7 +2454,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
           restore_default(&MuttVars[idx]);
       }
     }
-    else if (!myvar && (idx >= 0) && DTYPE(MuttVars[idx].type) == DT_BOOL)
+    else if (!myvar && (idx >= 0) && (DTYPE(MuttVars[idx].type) == DT_BOOL))
     {
       if (*s->dptr == '=')
       {
@@ -2579,7 +2579,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
           FREE(&myvar);
           myvar = "don't resort";
         }
-        else if ((idx >= 0) && DTYPE(MuttVars[idx].type) == DT_PATH)
+        else if ((idx >= 0) && (DTYPE(MuttVars[idx].type) == DT_PATH))
         {
           if (mutt_str_strcmp(MuttVars[idx].name, "debug_file") == 0 && debugfile_cmdline)
           {
@@ -2597,7 +2597,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
           if (mutt_str_strcmp(MuttVars[idx].name, "debug_file") == 0)
             restart_debug();
         }
-        else if ((idx >= 0) && DTYPE(MuttVars[idx].type) == DT_STRING)
+        else if ((idx >= 0) && (DTYPE(MuttVars[idx].type) == DT_STRING))
         {
           if ((strstr(MuttVars[idx].name, "charset") &&
                check_charset(&MuttVars[idx], tmp->data) < 0) |
@@ -2638,7 +2638,7 @@ static int parse_set(struct Buffer *tmp, struct Buffer *s, unsigned long data,
         }
       }
     }
-    else if (DTYPE(MuttVars[idx].type) == DT_REGEX)
+    else if ((idx >= 0) && (DTYPE(MuttVars[idx].type) == DT_REGEX))
     {
       if (query || *s->dptr != '=')
       {