summaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorRon Yorston2019-12-16 09:31:10 +0000
committerDenys Vlasenko2020-04-30 17:30:02 +0200
commit9f3b410006956c59896034bb790b20e655f8b4cb (patch)
treeffb97991063a42b85a4cc14e91317558d1f536b7 /shell/hush.c
parent981b2eff814bd186188ad66a32990a6d17b37a3e (diff)
downloadbusybox-9f3b410006956c59896034bb790b20e655f8b4cb.zip
busybox-9f3b410006956c59896034bb790b20e655f8b4cb.tar.gz
ash,hush: drop pointer check before calls to show_history
show_history() checks that its argument in non-null so there's no need to repeat the test at call sites. function old new delta historycmd 25 17 -8 builtin_history 29 21 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-16) Total: -16 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 0a92f5d..cab7ea5 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -10461,8 +10461,7 @@ static int FAST_FUNC builtin_help(char **argv UNUSED_PARAM)
#if MAX_HISTORY && ENABLE_FEATURE_EDITING
static int FAST_FUNC builtin_history(char **argv UNUSED_PARAM)
{
- if (G.line_input_state)
- show_history(G.line_input_state);
+ show_history(G.line_input_state);
return EXIT_SUCCESS;
}
#endif