From e450af57a3d26143e04915c885ff51f2749b26cb Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 19 Jan 2018 02:44:31 +0000 Subject: [PATCH] coverity --- init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.c b/init.c index 5342fa579..9a07b8472 100644 --- 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 != '=') { -- 2.40.0