tdb2: make tdb1_open use attributes for logging, hash function.
[ccan] / tools / ccan_depends.c
index 1baff828c267899364bd06ee0500fb1ab875d45c..4dda6fa274d65965daaceb4707b377b8bc1989ff 100644 (file)
@@ -12,7 +12,6 @@ int main(int argc, char *argv[])
        bool compile = false;
        bool recurse = true;
        bool ccan = true;
-       char *dirname, *basename;
 
        if (argv[1] && streq(argv[1], "--direct")) {
                argv++;
@@ -37,15 +36,12 @@ int main(int argc, char *argv[])
        if (!ccan && !compile)
                errx(1, "--non-ccan needs --compile");
 
-       dirname = talloc_dirname(NULL, argv[1]);
-       basename = talloc_basename(NULL, argv[1]);
-
        if (compile)
-               deps = get_deps(talloc_autofree_context(),
-                               dirname, basename, recurse);
+               deps = get_deps(talloc_autofree_context(), argv[1],
+                               recurse, NULL);
        else
                deps = get_safe_ccan_deps(talloc_autofree_context(),
-                                         dirname, basename, recurse);
+                                         argv[1], recurse);
 
        for (i = 0; deps[i]; i++)
                if (strstarts(deps[i], "ccan/") == ccan)