ccanlint: fix directory issues properly.
[ccan] / tools / namespacize.c
index 3a3fe47ea94503effe8622b1fc9369e4ebeca2f9..77269aac317dac5a4d7c7b319aa794472739f116 100644 (file)
@@ -457,9 +457,7 @@ static void adjust_dir(const char *dir)
 
        verbose("Adjusting %s\n", dir);
        verbose_indent();
-       for (deps = get_deps(parent, parent, talloc_basename(parent, dir),
-                            false, NULL);
-            *deps; deps++) {
+       for (deps = get_deps(parent, dir, false, NULL); *deps; deps++) {
                char *depdir;
                struct adjusted *adj = NULL;
                struct replace *repl;
@@ -497,8 +495,7 @@ static void adjust_dependents(const char *dir)
                if (access(info, R_OK) != 0)
                        continue;
 
-               for (deps = get_deps(*file, talloc_dirname(*file, *file),
-                                    talloc_basename(*file, *file), false, NULL);
+               for (deps = get_deps(*file, *file, false, NULL);
                     *deps; deps++) {
                        if (!strstarts(*deps, "ccan/"))
                                continue;