+ char *temp = NULL, **ret;
+ if (!infofile)
+ infofile = &temp;
+
+ if (!recurse) {
+ unsigned int num;
+ ret = get_one_deps(ctx, dir, &num, infofile);
+ } else
+ ret = get_all_deps(ctx, dir, infofile, get_one_deps);
+
+ if (infofile == &temp && temp) {
+ unlink(temp);
+ talloc_free(temp);
+ }
+ return ret;
+}
+
+char **get_safe_ccan_deps(const void *ctx, const char *dir,
+ bool recurse, char **infofile)
+{
+ if (!recurse) {
+ unsigned int num;
+ return get_one_safe_deps(ctx, dir, &num, infofile);
+ }
+ return get_all_deps(ctx, dir, infofile, get_one_safe_deps);