From: Richard Russon Date: Fri, 19 Jan 2018 02:44:31 +0000 (+0000) Subject: coverity X-Git-Tag: neomutt-20180223~30^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e450af57a3d26143e04915c885ff51f2749b26cb;p=neomutt coverity --- 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 != '=') {