From: Rusty Russell Date: Tue, 1 Nov 2011 23:01:25 +0000 (+1030) Subject: ccanlint: fix test link when given no arguments. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=ccf01ebb81709496554f1450d06b5dc2a09293f8 ccanlint: fix test link when given no arguments. Fallout from commit 758ab1f402b4af3cccac09548b709deca17ef930 (ccanlint: drop -d, interpret any arguments as directories...) --- diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 73a31572..fe99f7b4 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -712,15 +712,15 @@ int main(int argc, char *argv[]) if (verbose >= 4) tools_verbose = true; + /* This links back to the module's test dir. */ + testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL)); + /* Defaults to pwd. */ if (argc == 1) { i = 1; 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++) { unsigned int score, total_score; dir = argv[i];