]> git.ozlabs.org Git - ccan/commitdiff
ccanlint: handle when _info doesn't compile.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 12 Jan 2013 05:34:58 +0000 (16:04 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 12 Jan 2013 05:34:58 +0000 (16:04 +1030)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/ccanlint/tests/depends_exist.c
tools/depends.c

index 39015fd58730d9184edc0a295ab127a34005530c..f69a08e432b4a91951f79c23735c11a1705e384b 100644 (file)
@@ -57,6 +57,11 @@ static void check_depends_exist(struct manifest *m,
                deps = get_deps(m, m->dir, "depends", true,
                                get_or_compile_info);
 
+       if (!deps) {
+               score->error = tal_fmt(m, "Could not extract dependencies");
+               return;
+       }
+
        for (i = 0; deps[i]; i++) {
                if (!strstarts(deps[i], "ccan/"))
                        continue;
index 399b0aadf5affee6b8b814d2facc118a40150bf0..a506c3d1c7e526a41fdf7336b37f84f8dec59206 100644 (file)
@@ -198,6 +198,8 @@ get_all_deps(const void *ctx, const char *dir, const char *style,
        unsigned int i;
 
        deps = get_one(ctx, dir, style, get_info);
+       if (!deps)
+               return NULL;
        for (i = 0; i < tal_count(deps)-1; i++) {
                char **newdeps;
                unsigned int j;