From: Ralph Corderoy Date: Wed, 13 Sep 2017 10:31:29 +0000 (+0100) Subject: nmh_completion(): Simplify, removing local variable. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f07a022e29922690ff8eb54a3c2ea33a5fd3510d?hp=b42bad5fdb20cefbafdcc2b3c90e191b4a231787 nmh_completion(): Simplify, removing local variable. --- 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 *