aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_netjail_stop_testsystem.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-10-28 16:13:47 +0200
committert3sserakt <t3ss@posteo.de>2021-10-28 16:13:47 +0200
commit6fb788ca2ec44837ea10a36be7fd0030fb08955b (patch)
treecba4a385aa8ab914d02db9a702f6c6230aa89a2a /src/testing/testing_api_cmd_netjail_stop_testsystem.c
parent1609d627e509043a946f611d7589105cfae2364d (diff)
downloadgnunet-6fb788ca2ec44837ea10a36be7fd0030fb08955b.tar.gz
gnunet-6fb788ca2ec44837ea10a36be7fd0030fb08955b.zip
- fixed coverity issues
Diffstat (limited to 'src/testing/testing_api_cmd_netjail_stop_testsystem.c')
-rw-r--r--src/testing/testing_api_cmd_netjail_stop_testsystem.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/testing/testing_api_cmd_netjail_stop_testsystem.c b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
index 33792f1b0..e37e955be 100644
--- a/src/testing/testing_api_cmd_netjail_stop_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_stop_testsystem.c
@@ -35,6 +35,11 @@
35struct StopHelperState 35struct StopHelperState
36{ 36{
37 37
38 /**
39 * The complete topology information.
40 */
41 struct GNUNET_TESTING_NetjailTopology *topology;
42
38 const char *helper_start_label; 43 const char *helper_start_label;
39 44
40 /** 45 /**
@@ -63,21 +68,10 @@ struct StopHelperState
63static void 68static void
64stop_testing_system_cleanup (void *cls) 69stop_testing_system_cleanup (void *cls)
65{ 70{
71 struct StopHelperState *shs = cls;
66 72
67} 73 GNUNET_TESTING_free_topology (shs->topology);
68 74 GNUNET_free (shs);
69
70/**
71 * Trait function of this cmd does nothing.
72 *
73 */
74static int
75stop_testing_system_traits (void *cls,
76 const void **ret,
77 const char *trait,
78 unsigned int index)
79{
80 return GNUNET_OK;
81} 75}
82 76
83 77
@@ -148,13 +142,13 @@ GNUNET_TESTING_cmd_stop_testing_system (const char *label,
148 shs->local_m = topology->nodes_m; 142 shs->local_m = topology->nodes_m;
149 shs->global_n = topology->namespaces_n; 143 shs->global_n = topology->namespaces_n;
150 shs->known = topology->nodes_x; 144 shs->known = topology->nodes_x;
145 shs->topology = topology;
151 146
152 struct GNUNET_TESTING_Command cmd = { 147 struct GNUNET_TESTING_Command cmd = {
153 .cls = shs, 148 .cls = shs,
154 .label = label, 149 .label = label,
155 .run = &stop_testing_system_run, 150 .run = &stop_testing_system_run,
156 .cleanup = &stop_testing_system_cleanup, 151 .cleanup = &stop_testing_system_cleanup,
157 .traits = &stop_testing_system_traits
158 }; 152 };
159 153
160 return cmd; 154 return cmd;