From 4ded146c1b385977b02de6c66d6c1b1c514ebfbe Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 19 Mar 2012 15:44:59 +1030 Subject: [PATCH] ccanlint: handle -x correctly with multiple modules. After the first module we were resetting even the excluded tests, which caused a segfault as they weren't initialized. --- tools/ccanlint/ccanlint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 8c6ee1e4..516c5bb6 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -689,7 +689,9 @@ static bool run_tests(struct dgraph_node *all, static bool add_to_all(const char *member, struct ccanlint *c, struct dgraph_node *all) { - dgraph_add_edge(&c->node, all); + /* If we're excluded on cmdline, don't add. */ + if (!c->skip) + dgraph_add_edge(&c->node, all); return true; } -- 2.39.2