From f07a022e29922690ff8eb54a3c2ea33a5fd3510d Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Wed, 13 Sep 2017 11:31:29 +0100 Subject: [PATCH] nmh_completion(): Simplify, removing local variable. --- sbr/read_switch_multiword_via_readline.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sbr/read_switch_multiword_via_readline.c b/sbr/read_switch_multiword_via_readline.c index 94a17df9..0c099c56 100644 --- a/sbr/read_switch_multiword_via_readline.c +++ b/sbr/read_switch_multiword_via_readline.c @@ -75,16 +75,12 @@ initialize_readline(void) static char ** nmh_completion(const char *text, int start, int end) { - char **matches; - NMH_UNUSED (end); - matches = NULL; - if (start == 0) - matches = rl_completion_matches(text, nmh_command_generator); + return rl_completion_matches(text, nmh_command_generator); - return matches; + return NULL; } static char * -- 2.56.0