Simplify unnecessarily complex condition

!match || (match && ...) is exactly equivalent to !match || ...
This commit is contained in:
Kevin Easton
2017-01-02 15:09:21 +11:00
parent f8f6723b80
commit a047eba6da

View File

@@ -307,7 +307,7 @@ BUILT_IN_COMMAND(history)
for (tmp = command_history_tail, cnt = 0; tmp && (match || (cnt < max));
tmp = tmp->prev, cnt++)
{
if (!match || (match && wild_match(match, tmp->stuff)))
if (!match || wild_match(match, tmp->stuff))
put_it("%d: %s", tmp->number, tmp->stuff);
}
}