Browse Source

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.
Rusty Russell 14 years ago
parent
commit
4ded146c1b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/ccanlint/ccanlint.c

+ 3 - 1
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;
 }