X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Flicenses.c;h=45684974f528a506ef2a7be9b09db2ea877ce434;hb=daf9ee7d8e2b683ff05283beb1843611ad8c9e8a;hp=ac62ad3471a77fc376f2377317f56404d839db29;hpb=10e5e329a1a8804ff6461e1724071364cf6be572;p=ccan diff --git a/tools/ccanlint/licenses.c b/tools/ccanlint/licenses.c index ac62ad34..45684974 100644 --- a/tools/ccanlint/licenses.c +++ b/tools/ccanlint/licenses.c @@ -1,8 +1,8 @@ #include "licenses.h" #include "ccanlint.h" -#include #include -#include +#include +#include const struct license_info licenses[] = { { "LGPLv2+", "LGPL", @@ -155,9 +155,10 @@ enum license which_license(struct doc_section *d) return LICENSE_BSD; if (streq(d->lines[0], "CC0")) return LICENSE_CC0; - if (strreg(NULL, d->lines[0], "CC0 \\([Pp]ublic [Dd]omain\\)", NULL)) + if (tal_strreg(NULL, d->lines[0], "CC0 \\([Pp]ublic [Dd]omain\\)", + NULL)) return LICENSE_CC0; - if (strreg(NULL, d->lines[0], "[Pp]ublic [Dd]omain")) + if (tal_strreg(NULL, d->lines[0], "[Pp]ublic [Dd]omain")) return LICENSE_PUBLIC_DOMAIN; return LICENSE_UNKNOWN; @@ -169,7 +170,7 @@ const char *get_ccan_simplified(struct ccan_file *f) unsigned int i, j; /* Simplify for easy matching: only alnum and single spaces. */ - f->simplified = talloc_strdup(f, get_ccan_file_contents(f)); + f->simplified = tal_strdup(f, get_ccan_file_contents(f)); for (i = 0, j = 0; f->simplified[i]; i++) { if (cisupper(f->simplified[i])) f->simplified[j++] = tolower(f->simplified[i]);