Commit 5f4051ea authored by Joey Adams's avatar Joey Adams Committed by Rusty Russell

ccanlint: fix segfault caused by tests not depending on the "info" test.

These tests:

	"depends-exist"      (compulsory_tests/check_depends_exist.c)
	"info-documentation" (tests/has_info_documentation.c)

used m->info_file without checking if it was NULL,
leading to a segfault when no _info file was present.

Some other tests also used m->info_file without depending on "info",
but are taken care of indirectly by this patch.
parent af15570a
......@@ -74,4 +74,4 @@ struct ccanlint depends_exist = {
.check = check_depends_exist,
};
REGISTER_TEST(depends_exist, NULL);
REGISTER_TEST(depends_exist, &has_info, NULL);
......@@ -96,4 +96,4 @@ struct ccanlint has_info_documentation = {
.check = check_has_info_documentation,
};
REGISTER_TEST(has_info_documentation, NULL);
REGISTER_TEST(has_info_documentation, &has_info, NULL);
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