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.
t = (LIST *) safe_calloc (1, sizeof (LIST));
t->data = safe_strdup (str);
if (last)
- {
last->next = t;
- last = last->next;
- }
else
- *list = last = t;
+ *list = t;
}
}
t = mutt_new_rx_list();
t->rx = rx;
if (last)
- {
last->next = t;
- last = last->next;
- }
else
- *list = last = t;
+ *list = t;
}
else /* duplicate */
mutt_free_regexp (&rx);