From 6df2e44404bd710b13539a09450117f755498c65 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 11 Jun 2019 21:19:46 +0200 Subject: vty: command.c: Fix is_cmd_ambiguous() returning always 0 inner block defined variable "enum match_type ret" was being masking outter block variable "int ret = 0". The ret variable was being given non zero values only inside the inner block, so that change was done on the inner variable and not the outer one, which is returned. Fixes: 5314c513f23688462d7f7937e5ae5e0d5cd4548e Change-Id: Iec87d7db49a096d07e38ff8a060b923a52bfd6ba --- tests/vty/vty_transcript_test.vty | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/vty') diff --git a/tests/vty/vty_transcript_test.vty b/tests/vty/vty_transcript_test.vty index 27dacdca..5ed3c1d7 100644 --- a/tests/vty/vty_transcript_test.vty +++ b/tests/vty/vty_transcript_test.vty @@ -19,7 +19,7 @@ vty_transcript_test> multi0 o ok argc=1 o vty_transcript_test> multi0 t -ok argc=1 t +% Ambiguous command. vty_transcript_test> multi0 th ok argc=1 th @@ -42,7 +42,7 @@ vty_transcript_test> multi1 o ok argc=1 o vty_transcript_test> multi1 t -ok argc=1 t +% Ambiguous command. vty_transcript_test> multi1 th ok argc=1 th @@ -74,4 +74,4 @@ vty_transcript_test> multi1 on ok argc=1 on vty_transcript_test> multi2 t -ok argc=1 t +% Ambiguous command. -- cgit v1.2.3