X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fdepends_accurate.c;h=05ada48a40dc8b829c361beca5ba9d17350abc6c;hb=932d65dd6537250e617516749f03a00fea3b34f6;hp=2a47d0eb97fc7f3ded74a6ef01e676a1cd8fae75;hpb=cb1408d445f8f8c44cbc9cb6468b3ee3d4fa7b27;p=ccan diff --git a/tools/ccanlint/tests/depends_accurate.c b/tools/ccanlint/tests/depends_accurate.c index 2a47d0eb..05ada48a 100644 --- a/tools/ccanlint/tests/depends_accurate.c +++ b/tools/ccanlint/tests/depends_accurate.c @@ -22,7 +22,7 @@ static bool has_dep(struct manifest *m, char **deps, bool *used, unsigned int i; /* We can include ourselves, of course. */ - if (streq(depname + strlen("ccan/"), m->basename)) + if (streq(depname + strlen("ccan/"), m->modname)) return true; for (i = 0; deps[i]; i++) { @@ -48,7 +48,7 @@ static bool check_dep_includes(struct manifest *m, char *mod; if (!strreg(f, lines[i], "^[ \t]*#[ \t]*include[ \t]*[<\"]" - "(ccan/+[^/]+)/", &mod)) + "(ccan/+.+)/+[^/]+\\.h", &mod)) continue; if (has_dep(m, deps, used, mod))