]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
ccanlint: fix test link when given no arguments.
[ccan] / tools / ccanlint / ccanlint.c
index 73a315722e7b2d3bbe434daab4906cfa12a372a4..fe99f7b4cfe6254d436e718fa87b121dd5452435 100644 (file)
@@ -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];