From a047eba6da571bf270312d418f5af4cd32b24b2f Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Mon, 2 Jan 2017 15:09:21 +1100 Subject: [PATCH] Simplify unnecessarily complex condition !match || (match && ...) is exactly equivalent to !match || ... --- source/history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/history.c b/source/history.c index 705e4b8..0947f84 100644 --- a/source/history.c +++ b/source/history.c @@ -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); } }