diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-03-03 09:06:51 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-04-21 10:19:01 +0200 |
commit | a91a3bac14976c04bf22b20c7e4bada787ec79b1 (patch) | |
tree | 1c16b21c785b22c4f7c093e80dcf2c2af20243d1 | |
parent | 3cf4053a9e832408fad33a8246ecbd189f23a956 (diff) | |
download | quagga-a91a3bac14976c04bf22b20c7e4bada787ec79b1.tar.bz2 quagga-a91a3bac14976c04bf22b20c7e4bada787ec79b1.tar.xz |
vtysh: don't use '\0' as NULL
for some reason, the vty code was using '\0' in place of NULL.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | lib/vty.c | 6 | ||||
-rw-r--r-- | vtysh/vtysh.c | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -870,7 +870,7 @@ vty_complete_command (struct vty *vty) /* In case of 'help \t'. */ if (isspace ((int) vty->buf[vty->length - 1])) - vector_set (vline, '\0'); + vector_set (vline, NULL); matched = cmd_complete_command (vline, vty, &ret); @@ -985,11 +985,11 @@ vty_describe_command (struct vty *vty) if (vline == NULL) { vline = vector_init (1); - vector_set (vline, '\0'); + vector_set (vline, NULL); } else if (isspace ((int) vty->buf[vty->length - 1])) - vector_set (vline, '\0'); + vector_set (vline, NULL); describe = cmd_describe_command (vline, vty, &ret); diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 984f8d39..5490b335 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -563,11 +563,11 @@ vtysh_rl_describe (void) if (vline == NULL) { vline = vector_init (1); - vector_set (vline, '\0'); + vector_set (vline, NULL); } else if (rl_end && isspace ((int) rl_line_buffer[rl_end - 1])) - vector_set (vline, '\0'); + vector_set (vline, NULL); describe = cmd_describe_command (vline, vty, &ret); @@ -657,7 +657,7 @@ command_generator (const char *text, int state) return NULL; if (rl_end && isspace ((int) rl_line_buffer[rl_end - 1])) - vector_set (vline, '\0'); + vector_set (vline, NULL); matched = cmd_complete_command (vline, vty, &complete_status); } |