From: Rusty Russell Date: Mon, 19 Mar 2012 05:14:59 +0000 (+1030) Subject: ccanlint: handle -x correctly with multiple modules. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=4ded146c1b385977b02de6c66d6c1b1c514ebfbe 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. --- 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; }