]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/license_exists.c
ccanlint: score_file_error() takes printf-format
[ccan] / tools / ccanlint / tests / license_exists.c
index 965a159ff8fff53f15bea96d4675c052eedbd9f0..72461bec6d40ab4b3534385dc1c1c3bc932c3c9f 100644 (file)
@@ -90,7 +90,7 @@ static void check_has_license(struct manifest *m,
 
        d = find_license(m);
        if (!d) {
-               score->error = "No License: tag in _info";
+               score->error = talloc_strdup(score, "No License: tag in _info");
                return;
        }
        expected = expected_link(m, d);
@@ -111,7 +111,8 @@ static void check_has_license(struct manifest *m,
                        return;
                }
                if (errno == ENOENT) {
-                       score->error = "LICENSE does not exist";
+                       score->error = talloc_strdup(score,
+                                                    "LICENSE does not exist");
                        if (expected)
                                has_license.handle = handle_license_link;
                        return;