Browse Source

ccanlint: fix -k has_examples

Rusty Russell 15 years ago
parent
commit
6cb87a7743
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tools/ccanlint/tests/has_examples.c

+ 3 - 1
tools/ccanlint/tests/has_examples.c

@@ -25,7 +25,9 @@ static char *add_example(struct manifest *m, struct ccan_file *source,
 	struct ccan_file *f;
 
 	name = maybe_temp_file(m, ".c", keep, 
-			       talloc_asprintf(m, "example-%s-%s",
+			       talloc_asprintf(m, "%s/example-%s-%s",
+					       talloc_dirname(m,
+							      source->fullname),
 					       source->name,
 					       example->function));
 	f = new_ccan_file(m, talloc_dirname(m, name), talloc_basename(m, name));