ofp-actions: Fix use-after-free in bundle action.
[cascardo/ovs.git] / tests / ovstest.c
index f05da05..3f3430d 100644 (file)
@@ -60,7 +60,7 @@ flush_help_string(struct ds *ds)
 }
 
 static void
-help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
+help(struct ovs_cmdl_context *ctx OVS_UNUSED)
 {
     const struct ovs_cmdl_command *p;
     struct ds test_names = DS_EMPTY_INITIALIZER;
@@ -92,7 +92,7 @@ add_top_level_commands(void)
 }
 
 void
-ovstest_register(const char *test_name, ovstest_func f)
+ovstest_register(const char *test_name, ovs_cmdl_handler f)
 {
     struct ovs_cmdl_command test_cmd;
 
@@ -125,7 +125,11 @@ main(int argc, char *argv[])
 
     add_top_level_commands();
     if (argc > 1) {
-        ovs_cmdl_run_command(argc - 1, argv + 1, commands);
+        struct ovs_cmdl_context ctx = {
+            .argc = argc - 1,
+            .argv = argv + 1,
+        };
+        ovs_cmdl_run_command(&ctx, commands);
     }
     cleanup();