Commit 897d4f1d authored by Jon Griffiths's avatar Jon Griffiths

tools/ccan_depends: Don't crash when no dependencies are found

Running 'tools/ccan_depends --compile ccan/crypto' without this
patch will demonstrate the crash.
Signed-off-by: default avatarJon Griffiths <jon_p_griffiths@yahoo.com>
parent b5291173
...@@ -46,6 +46,7 @@ int main(int argc, char *argv[]) ...@@ -46,6 +46,7 @@ int main(int argc, char *argv[])
else else
deps = get_safe_ccan_deps(NULL, argv[1], style, recurse); deps = get_safe_ccan_deps(NULL, argv[1], style, recurse);
if (deps)
for (i = 0; deps[i]; i++) for (i = 0; deps[i]; i++)
if (strstarts(deps[i], "ccan/") == ccan) if (strstarts(deps[i], "ccan/") == ccan)
printf("%s\n", deps[i]); printf("%s\n", deps[i]);
......
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