summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-09-07 20:30:24 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-09-08 18:00:17 +0200
commit7c70dc57e03e573827040fd1c1408a5923c526f1 (patch)
tree9611889eff6404c6766fe48b81108b7d0bf31e67 /vtysh/vtysh.c
parentvtysh: Add code to isolate append_history (diff)
downloadfrr-7c70dc57e03e573827040fd1c1408a5923c526f1.tar.xz
frr-7c70dc57e03e573827040fd1c1408a5923c526f1.zip
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--vtysh/vtysh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index c249115fd..bcae4407c 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)