X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-jsonrpc.c;h=7251265fe40608b1c72a2d8ff44e446f104ea414;hb=cfc50ae514f805dcd9c14589f21158185424daf6;hp=4ace6dc63c8d377c0d726b8bbc9e0e25a2daccc3;hpb=eadd16449c6e5292603cf009d29ab0e249979717;p=sliver-openvswitch.git diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c index 4ace6dc63..7251265fe 100644 --- a/tests/test-jsonrpc.c +++ b/tests/test-jsonrpc.c @@ -35,10 +35,9 @@ #include "vlog.h" #include "ovstest.h" -static struct command all_commands[]; - static void usage(void) NO_RETURN; static void parse_options(int argc, char *argv[]); +static struct command *get_all_commands(void); static void test_jsonrpc_main(int argc, char *argv[]) @@ -46,7 +45,7 @@ test_jsonrpc_main(int argc, char *argv[]) proctitle_init(argc, argv); set_program_name(argv[0]); parse_options(argc, argv); - run_command(argc - optind, argv + optind, all_commands); + run_command(argc - optind, argv + optind, get_all_commands()); } static void @@ -337,4 +336,10 @@ static struct command all_commands[] = { { NULL, 0, 0, NULL }, }; +static struct command * +get_all_commands(void) +{ + return all_commands; +} + OVSTEST_REGISTER("test-jsonrpc", test_jsonrpc_main);