summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vtysh/vtysh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 20f7df44..bff06323 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -275,7 +275,7 @@ vtysh_pager_init (void)
static int
vtysh_execute_func (const char *line, int pager)
{
- int ret, cmd_stat = CMD_SUCCESS;
+ int ret, cmd_stat;
u_int i;
vector vline;
struct cmd_element *cmd;
@@ -336,6 +336,7 @@ vtysh_execute_func (const char *line, int pager)
cmd_free_strvec (vline);
+ cmd_stat = ret;
switch (ret)
{
case CMD_WARNING: