From 9835196ec9c6ac2f058b862c1a9f401723ffd583 Mon Sep 17 00:00:00 2001 From: "G. Paul Ziemba" Date: Fri, 21 Jul 2023 05:41:07 -0700 Subject: [PATCH] pbrd: fix coverity issue Signed-off-by: G. Paul Ziemba --- pbrd/pbr_vty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index bc83c2d61c..8e9673482e 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -73,7 +73,7 @@ DEFPY(pbr_map_match_vlan_id, pbr_map_match_vlan_id_cmd, /* clang-format off */ DEFPY(pbr_map_match_vlan_tag, pbr_map_match_vlan_tag_cmd, - "[no] match vlan [$tag_type]", + "[no] match vlan ![$tag_type]", NO_STR "Match the rest of the command\n" "Match based on VLAN tagging\n" @@ -88,6 +88,7 @@ DEFPY(pbr_map_match_vlan_tag, pbr_map_match_vlan_tag_cmd, return CMD_WARNING; if (!no) { + assert(tag_type); if (strmatch(tag_type, "tagged")) { pbr_set_match_clause_for_vlan(pbrms, 0, PBR_VLAN_FLAGS_TAGGED); -- 2.39.5