]> git.ozlabs.org Git - ccan/blobdiff - tools/manifest.c
tools: fix bogus unreachable return.
[ccan] / tools / manifest.c
index e41c7abc371b8d1b80dcf41ab67b126b09fbcf93..024eaa42a0d42c469e08f2ccba78846f58e0f1d5 100644 (file)
@@ -23,8 +23,6 @@
 #include <stdarg.h>
 #include <assert.h>
 
-const char *ccan_dir;
-
 static size_t dir_hash(const char *name)
 {
        return hash(name, strlen(name), 0);
@@ -249,21 +247,6 @@ struct manifest *get_manifest(const void *ctx, const char *dir)
                errx(1, "I don't expect to be run from the root directory");
        m->basename++;
 
-       /* We expect the ccan dir to be two levels above module dir. */
-       if (!ccan_dir) {
-               char *p, *dir;
-               dir = talloc_strdup(NULL, m->dir);
-               p = strrchr(dir, '/');
-               if (!p)
-                       errx(1, "I expect the ccan root directory in ../..");
-               *p = '\0';
-               p = strrchr(dir, '/');
-               if (!p)
-                       errx(1, "I expect the ccan root directory in ../..");
-               *p = '\0';
-               ccan_dir = dir;
-       }
-
        add_files(m, "");
 
        /* Nicer to run tests in a predictable order. */