]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/license_exists.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / tools / ccanlint / tests / license_exists.c
index af1bc52a07c85e875829f54824c56bdad9540256..3482bfee7745d6913a76380e8648a18695e62d65 100644 (file)
@@ -1,6 +1,7 @@
 #include <tools/ccanlint/ccanlint.h>
 #include <ccan/tal/tal.h>
 #include <ccan/tal/str/str.h>
 #include <tools/ccanlint/ccanlint.h>
 #include <ccan/tal/tal.h>
 #include <ccan/tal/str/str.h>
+#include <ccan/tal/path/path.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -73,7 +74,7 @@ static void handle_license_link(struct manifest *m, struct score *score)
 {
        struct doc_section *d = find_license_tag(m);
        const char *prefix = link_prefix(m);
 {
        struct doc_section *d = find_license_tag(m);
        const char *prefix = link_prefix(m);
-       const char *link = tal_fmt(m, "%s/LICENSE", m->dir);
+       const char *link = path_join(m, m->dir, "LICENSE");
        const char *ldest = expected_link(score, prefix, m->license);
        char *q;
 
        const char *ldest = expected_link(score, prefix, m->license);
        char *q;
 
@@ -93,11 +94,12 @@ static void handle_license_link(struct manifest *m, struct score *score)
 extern struct ccanlint license_exists;
 
 static void check_has_license(struct manifest *m,
 extern struct ccanlint license_exists;
 
 static void check_has_license(struct manifest *m,
-                             unsigned int *timeleft, struct score *score)
+                             unsigned int *timeleft UNNEEDED,
+                             struct score *score)
 {
        char buf[PATH_MAX];
        ssize_t len;
 {
        char buf[PATH_MAX];
        ssize_t len;
-       char *license = tal_fmt(m, "%s/LICENSE", m->dir);
+       char *license = path_join(m, m->dir, "LICENSE");
        const char *expected;
        struct doc_section *d;
        const char *prefix = link_prefix(m);
        const char *expected;
        struct doc_section *d;
        const char *prefix = link_prefix(m);