Browse Source

ccanlint: fix test link when given no arguments.

Fallout from commit 758ab1f402b4af3cccac09548b709deca17ef930
(ccanlint: drop -d, interpret any arguments as directories...)
Rusty Russell 14 years ago
parent
commit
ccf01ebb81
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tools/ccanlint/ccanlint.c

+ 3 - 3
tools/ccanlint/ccanlint.c

@@ -712,15 +712,15 @@ int main(int argc, char *argv[])
 	if (verbose >= 4)
 	if (verbose >= 4)
 		tools_verbose = true;
 		tools_verbose = true;
 
 
+	/* This links back to the module's test dir. */
+	testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
+
 	/* Defaults to pwd. */
 	/* Defaults to pwd. */
 	if (argc == 1) {
 	if (argc == 1) {
 		i = 1;
 		i = 1;
 		goto got_dir;
 		goto got_dir;
 	}
 	}
 
 
-	/* This links back to the module's test dir. */
-	testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
-
 	for (i = 1; i < argc; i++) {
 	for (i = 1; i < argc; i++) {
 		unsigned int score, total_score;
 		unsigned int score, total_score;
 		dir = argv[i];
 		dir = argv[i];