From: Quentin Young Date: Wed, 11 Apr 2018 18:09:21 +0000 (-0400) Subject: lib: add asserts on returned matcher vals X-Git-Tag: frr-5.0-dev~52^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=039c1e8d4f858661a4211ba16145d6c53c49b8ba;p=matthieu%2Ffrr.git 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 --- 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);