From 738555ab3c6e6f6a2b00dfcba5c437a6c7f949dc Mon Sep 17 00:00:00 2001 From: Hongjun Ni Date: Wed, 23 Nov 2016 22:20:06 +0800 Subject: Fix nsh_action CLI issue rebuild Change-Id: I5d823724186bdc31b15e4739f9f33f0a29d87fbe Signed-off-by: Hongjun Ni --- nsh-plugin/nsh/nsh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nsh-plugin/nsh/nsh.c b/nsh-plugin/nsh/nsh.c index ae440b8..924eda2 100644 --- a/nsh-plugin/nsh/nsh.c +++ b/nsh-plugin/nsh/nsh.c @@ -311,14 +311,15 @@ static uword unformat_nsh_action (unformat_input_t * input, va_list * args) if (unformat (input, "swap")) *result = NSH_ACTION_SWAP; - if (unformat (input, "push")) + else if (unformat (input, "push")) *result = NSH_ACTION_PUSH; - if (unformat (input, "pop")) + else if (unformat (input, "pop")) *result = NSH_ACTION_POP; else if (unformat (input, "%d", &tmp)) *result = tmp; else return 0; + return 1; } -- cgit 1.2.3-korg