summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-04-11 14:09:21 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-04-13 17:17:42 -0400
commit039c1e8d4f858661a4211ba16145d6c53c49b8ba (patch)
tree234bda9b82410c4517700cd61982e024c0585849 /lib/command_match.c
parent8934b81c69f43d81923133fba3989135692c9f34 (diff)
lib: add asserts on returned matcher vals
These asserts verify that the status correlates with the expected result and fixes a clang-analyze warning. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index f6b07a0b20..99ec03e0c2 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -99,6 +99,9 @@ enum matcher_rv command_match(struct graph *cmdgraph, vector vline,
struct listnode *head = listhead(*argv);
struct listnode *tail = listtail(*argv);
+ assert(head);
+ assert(tail);
+
// delete dummy start node
cmd_token_del((struct cmd_token *)head->data);
list_delete_node(*argv, head);