]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: Actually make the new_completion function match
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 7 Sep 2018 18:30:24 +0000 (14:30 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 8 Sep 2018 16:00:17 +0000 (12:00 -0400)
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 <sharpd@cumulusnetworks.com>
vtysh/vtysh.c

index c249115fd372d8468cb2e5f887c98f6ddc70912b..bcae4407cbccec11e50b43a3ee78b4389f76945d 100644 (file)
@@ -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)