________________________________________________________________________________________________________
*** CID 187781: Control flow issues (DEADCODE)
/mutt/regex.c: 142 in mutt_regexlist_add()
136 mutt_buffer_printf(err, "Bad regex: %s\n", str);
137 return -1;
138 }
139
140 /* check to make sure the item is not already on this rl */
141 struct RegexListNode *np = NULL;
>>> CID 187781: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "np" inside this statement: "np = (np ? np : rl->stqh_fi...".
142 STAILQ_FOREACH_FROM(np, rl, entries)
143 {
144 if (mutt_str_strcasecmp(rx->pattern, np->regex->pattern) ==
0)
145 break; /* already on the rl */
146 }
147
/* check to make sure the item is not already on this rl */
struct RegexListNode *np = NULL;
- STAILQ_FOREACH_FROM(np, rl, entries)
+ STAILQ_FOREACH(np, rl, entries)
{
if (mutt_str_strcasecmp(rx->pattern, np->regex->pattern) == 0)
break; /* already on the rl */