Commit 6165b3af authored by Rusty Russell's avatar Rusty Russell

tools: simplify get_safe_ccan_deps

There's no reason to hand in the name of the compiled _info file,
since we don't compile it up in safe mode.
parent 9361a12f
......@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
recurse, NULL);
else
deps = get_safe_ccan_deps(talloc_autofree_context(),
argv[1], recurse, NULL);
argv[1], recurse);
for (i = 0; deps[i]; i++)
if (strstarts(deps[i], "ccan/") == ccan)
......
......@@ -45,8 +45,7 @@ static void check_depends_exist(struct manifest *m,
*strrchr(updir, '/') = '\0';
if (safe_mode)
deps = get_safe_ccan_deps(m, m->dir, true,
&m->info_file->compiled);
deps = get_safe_ccan_deps(m, m->dir, true);
else
deps = get_deps(m, m->dir, true, &m->info_file->compiled);
......
......@@ -255,11 +255,11 @@ char **get_deps(const void *ctx, const char *dir,
}
char **get_safe_ccan_deps(const void *ctx, const char *dir,
bool recurse, char **infofile)
bool recurse)
{
if (!recurse) {
unsigned int num;
return get_one_safe_deps(ctx, dir, &num, infofile);
return get_one_safe_deps(ctx, dir, &num, NULL);
}
return get_all_deps(ctx, dir, infofile, get_one_safe_deps);
return get_all_deps(ctx, dir, NULL, get_one_safe_deps);
}
......@@ -24,8 +24,7 @@ char **get_deps(const void *ctx, const char *dir, bool recurse,
char **infofile);
/* This is safer: just looks for ccan/ strings in info */
char **get_safe_ccan_deps(const void *ctx, const char *dir,
bool recurse, char **infofile);
char **get_safe_ccan_deps(const void *ctx, const char *dir, bool recurse);
/* This also needs to compile the info file. */
char **get_libs(const void *ctx, const char *dir,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment