From 7c70dc57e03e573827040fd1c1408a5923c526f1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 7 Sep 2018 14:30:24 -0400 Subject: [PATCH] vtysh: Actually make the new_completion function match The new_completion function was not declared the same way the rl_attempted_completion_function pointer was. The only difference was a 'const char *' -vs- 'char *' So convert it over. Signed-off-by: Donald Sharp --- vtysh/vtysh.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index c249115fd3..bcae4407cb 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1112,7 +1112,7 @@ static char *command_generator(const char *text, int state) return NULL; } -static char **new_completion(char *text, int start, int end) +static char **new_completion(const char *text, int start, int end) { char **matches; @@ -3386,8 +3386,7 @@ void vtysh_readline_init(void) rl_initialize(); rl_bind_key('?', (rl_command_func_t *)vtysh_rl_describe); rl_completion_entry_function = vtysh_completion_entry_function; - rl_attempted_completion_function = - (rl_completion_func_t *)new_completion; + rl_attempted_completion_function = new_completion; } char *vtysh_prompt(void) -- 2.39.5