Skip to content

Commit

Permalink
Remove useless assignments in add_to_list functions.
Browse files Browse the repository at this point in the history
The code was probably pulled from some of the header processing
functions, which were in a loop.  In those versions, "last" pointed to
a collection of new entries appended, but in these two functions,
updating last just obfuscates the code.
  • Loading branch information
kevin8t8 authored and flatcap committed Feb 20, 2018
1 parent 676c48e commit f679b1e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mutt/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,9 @@ int mutt_regexlist_add(struct RegexList **rl, const char *str, int flags, struct
t = mutt_regexlist_new();
t->regex = rx;
if (last)
{
last->next = t;
last = last->next;
}
else
*rl = last = t;
*rl = t;
}
else /* duplicate */
mutt_regex_free(&rx);
Expand Down

0 comments on commit f679b1e

Please sign in to comment.