mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 01:42:48 +00:00
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>
This commit is contained in:
parent
8934b81c69
commit
039c1e8d4f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user