diff options
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/gnunet-helper-testbed.c | 2 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 12 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_cache.c | 4 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_connectionpool.c | 2 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_cpustatus.c | 2 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_links.c | 6 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_oc.c | 24 | ||||
-rw-r--r-- | src/testbed/gnunet-service-testbed_peers.c | 6 | ||||
-rw-r--r-- | src/testbed/gnunet_testbed_mpi_spawn.c | 2 | ||||
-rw-r--r-- | src/testbed/test_gnunet_helper_testbed.c | 2 | ||||
-rw-r--r-- | src/testbed/test_testbed_api_statistics.c | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api.c | 6 | ||||
-rw-r--r-- | src/testbed/testbed_api_hosts.c | 17 | ||||
-rw-r--r-- | src/testbed/testbed_api_operations.c | 10 | ||||
-rw-r--r-- | src/testbed/testbed_api_peers.c | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api_statistics.c | 4 | ||||
-rw-r--r-- | src/testbed/testbed_api_testbed.c | 8 | ||||
-rw-r--r-- | src/testbed/testbed_api_topology.c | 8 |
18 files changed, 60 insertions, 59 deletions
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index 4c1637db6..24c212d6b 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c | |||
@@ -405,7 +405,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
405 | GNUNET_free (evstr); | 405 | GNUNET_free (evstr); |
406 | evstr = NULL; | 406 | evstr = NULL; |
407 | } | 407 | } |
408 | GNUNET_free_non_null (hostname); | 408 | GNUNET_free (hostname); |
409 | hostname = NULL; | 409 | hostname = NULL; |
410 | GNUNET_assert (NULL != test_system); | 410 | GNUNET_assert (NULL != test_system); |
411 | GNUNET_assert (GNUNET_OK == | 411 | GNUNET_assert (GNUNET_OK == |
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 21a9d0a51..3ef99ae25 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -550,8 +550,8 @@ handle_add_host (void *cls, | |||
550 | GNUNET_strlcpy (hostname, ptr, hostname_length + 1); | 550 | GNUNET_strlcpy (hostname, ptr, hostname_length + 1); |
551 | if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header))) | 551 | if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header))) |
552 | { | 552 | { |
553 | GNUNET_free_non_null (username); | 553 | GNUNET_free (username); |
554 | GNUNET_free_non_null (hostname); | 554 | GNUNET_free (hostname); |
555 | GNUNET_break_op (0); | 555 | GNUNET_break_op (0); |
556 | GNUNET_SERVICE_client_drop (client); | 556 | GNUNET_SERVICE_client_drop (client); |
557 | return; | 557 | return; |
@@ -570,7 +570,7 @@ handle_add_host (void *cls, | |||
570 | username, | 570 | username, |
571 | host_cfg, | 571 | host_cfg, |
572 | ntohs (msg->ssh_port)); | 572 | ntohs (msg->ssh_port)); |
573 | GNUNET_free_non_null (username); | 573 | GNUNET_free (username); |
574 | GNUNET_free (hostname); | 574 | GNUNET_free (hostname); |
575 | GNUNET_CONFIGURATION_destroy (host_cfg); | 575 | GNUNET_CONFIGURATION_destroy (host_cfg); |
576 | if (NULL == host) | 576 | if (NULL == host) |
@@ -757,17 +757,17 @@ shutdown_task (void *cls) | |||
757 | for (id = 0; id < GST_host_list_size; id++) | 757 | for (id = 0; id < GST_host_list_size; id++) |
758 | if (NULL != GST_host_list[id]) | 758 | if (NULL != GST_host_list[id]) |
759 | GNUNET_TESTBED_host_destroy (GST_host_list[id]); | 759 | GNUNET_TESTBED_host_destroy (GST_host_list[id]); |
760 | GNUNET_free_non_null (GST_host_list); | 760 | GNUNET_free (GST_host_list); |
761 | if (NULL != GST_context) | 761 | if (NULL != GST_context) |
762 | { | 762 | { |
763 | GNUNET_free_non_null (GST_context->master_ip); | 763 | GNUNET_free (GST_context->master_ip); |
764 | if (NULL != GST_context->system) | 764 | if (NULL != GST_context->system) |
765 | GNUNET_TESTING_system_destroy (GST_context->system, | 765 | GNUNET_TESTING_system_destroy (GST_context->system, |
766 | GNUNET_YES); | 766 | GNUNET_YES); |
767 | GNUNET_free (GST_context); | 767 | GNUNET_free (GST_context); |
768 | GST_context = NULL; | 768 | GST_context = NULL; |
769 | } | 769 | } |
770 | GNUNET_free_non_null (hostname); | 770 | GNUNET_free (hostname); |
771 | /* Free hello cache */ | 771 | /* Free hello cache */ |
772 | GST_cache_clear (); | 772 | GST_cache_clear (); |
773 | GST_connection_pool_destroy (); | 773 | GST_connection_pool_destroy (); |
diff --git a/src/testbed/gnunet-service-testbed_cache.c b/src/testbed/gnunet-service-testbed_cache.c index f87f39067..5e74b865a 100644 --- a/src/testbed/gnunet-service-testbed_cache.c +++ b/src/testbed/gnunet-service-testbed_cache.c | |||
@@ -120,7 +120,7 @@ static void | |||
120 | free_entry (struct CacheEntry *entry) | 120 | free_entry (struct CacheEntry *entry) |
121 | { | 121 | { |
122 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry); | 122 | GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry); |
123 | GNUNET_free_non_null (entry->hello); | 123 | GNUNET_free (entry->hello); |
124 | GNUNET_free (entry); | 124 | GNUNET_free (entry); |
125 | } | 125 | } |
126 | 126 | ||
@@ -261,7 +261,7 @@ GST_cache_add_hello (const unsigned int peer_id, | |||
261 | entry = cache_lookup (peer_id); | 261 | entry = cache_lookup (peer_id); |
262 | if (NULL == entry) | 262 | if (NULL == entry) |
263 | entry = add_entry (peer_id); | 263 | entry = add_entry (peer_id); |
264 | GNUNET_free_non_null (entry->hello); | 264 | GNUNET_free (entry->hello); |
265 | entry->hello = GNUNET_copy_message (hello); | 265 | entry->hello = GNUNET_copy_message (hello); |
266 | } | 266 | } |
267 | 267 | ||
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.c b/src/testbed/gnunet-service-testbed_connectionpool.c index 7f9c9fd57..7318971b3 100644 --- a/src/testbed/gnunet-service-testbed_connectionpool.c +++ b/src/testbed/gnunet-service-testbed_connectionpool.c | |||
@@ -687,7 +687,7 @@ oprelease_get_handle_core (void *cls) | |||
687 | return; | 687 | return; |
688 | GNUNET_CORE_disconnect (entry->handle_core); | 688 | GNUNET_CORE_disconnect (entry->handle_core); |
689 | entry->handle_core = NULL; | 689 | entry->handle_core = NULL; |
690 | GNUNET_free_non_null (entry->peer_identity); | 690 | GNUNET_free (entry->peer_identity); |
691 | entry->peer_identity = NULL; | 691 | entry->peer_identity = NULL; |
692 | } | 692 | } |
693 | 693 | ||
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c index 2d490ba8c..70b865c73 100644 --- a/src/testbed/gnunet-service-testbed_cpustatus.c +++ b/src/testbed/gnunet-service-testbed_cpustatus.c | |||
@@ -649,7 +649,7 @@ GST_stats_destroy () | |||
649 | proc_stat = NULL; | 649 | proc_stat = NULL; |
650 | } | 650 | } |
651 | #elif OSX | 651 | #elif OSX |
652 | GNUNET_free_non_null (prev_cpu_load); | 652 | GNUNET_free (prev_cpu_load); |
653 | #endif | 653 | #endif |
654 | if (NULL != sample_load_task_id) | 654 | if (NULL != sample_load_task_id) |
655 | { | 655 | { |
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c index ee00e4be0..fb25d7bcb 100644 --- a/src/testbed/gnunet-service-testbed_links.c +++ b/src/testbed/gnunet-service-testbed_links.c | |||
@@ -401,7 +401,7 @@ GST_route_list_clear () | |||
401 | for (id = 0; id < route_list_size; id++) | 401 | for (id = 0; id < route_list_size; id++) |
402 | if (NULL != route_list[id]) | 402 | if (NULL != route_list[id]) |
403 | GNUNET_free (route_list[id]); | 403 | GNUNET_free (route_list[id]); |
404 | GNUNET_free_non_null (route_list); | 404 | GNUNET_free (route_list); |
405 | route_list = NULL; | 405 | route_list = NULL; |
406 | } | 406 | } |
407 | 407 | ||
@@ -508,7 +508,7 @@ GST_slave_list_clear () | |||
508 | continue; | 508 | continue; |
509 | destroy_slave (slave); | 509 | destroy_slave (slave); |
510 | } | 510 | } |
511 | GNUNET_free_non_null (GST_slave_list); | 511 | GNUNET_free (GST_slave_list); |
512 | GST_slave_list = NULL; | 512 | GST_slave_list = NULL; |
513 | } | 513 | } |
514 | 514 | ||
@@ -1104,7 +1104,7 @@ GST_neighbour_list_clean () | |||
1104 | GNUNET_free (n); | 1104 | GNUNET_free (n); |
1105 | neighbour_list[id] = NULL; | 1105 | neighbour_list[id] = NULL; |
1106 | } | 1106 | } |
1107 | GNUNET_free_non_null (neighbour_list); | 1107 | GNUNET_free (neighbour_list); |
1108 | } | 1108 | } |
1109 | 1109 | ||
1110 | 1110 | ||
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c index 262fcfc00..3d13ac8cc 100644 --- a/src/testbed/gnunet-service-testbed_oc.c +++ b/src/testbed/gnunet-service-testbed_oc.c | |||
@@ -360,7 +360,7 @@ GST_cleanup_focc (struct ForwardedOverlayConnectContext *focc) | |||
360 | GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head, | 360 | GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head, |
361 | rhc->focc_dll_tail, | 361 | rhc->focc_dll_tail, |
362 | focc); | 362 | focc); |
363 | GNUNET_free_non_null (focc->orig_msg); | 363 | GNUNET_free (focc->orig_msg); |
364 | GNUNET_free (focc); | 364 | GNUNET_free (focc); |
365 | } | 365 | } |
366 | 366 | ||
@@ -536,8 +536,8 @@ cleanup_occ (struct OverlayConnectContext *occ) | |||
536 | 536 | ||
537 | LOG_DEBUG ("0x%llx: Cleaning up occ\n", | 537 | LOG_DEBUG ("0x%llx: Cleaning up occ\n", |
538 | occ->op_id); | 538 | occ->op_id); |
539 | GNUNET_free_non_null (occ->emsg); | 539 | GNUNET_free (occ->emsg); |
540 | GNUNET_free_non_null (occ->hello); | 540 | GNUNET_free (occ->hello); |
541 | if (NULL != occ->send_hello_task) | 541 | if (NULL != occ->send_hello_task) |
542 | GNUNET_SCHEDULER_cancel (occ->send_hello_task); | 542 | GNUNET_SCHEDULER_cancel (occ->send_hello_task); |
543 | if (NULL != occ->cleanup_task) | 543 | if (NULL != occ->cleanup_task) |
@@ -727,7 +727,7 @@ overlay_connect_notify (void *cls, | |||
727 | cleanup_occ_rp2c (&occ->p2ctx.remote); | 727 | cleanup_occ_rp2c (&occ->p2ctx.remote); |
728 | break; | 728 | break; |
729 | } | 729 | } |
730 | GNUNET_free_non_null (occ->emsg); | 730 | GNUNET_free (occ->emsg); |
731 | occ->emsg = NULL; | 731 | occ->emsg = NULL; |
732 | send_overlay_connect_success_msg (occ); | 732 | send_overlay_connect_success_msg (occ); |
733 | occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ, | 733 | occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ, |
@@ -758,7 +758,7 @@ occ_cache_get_handle_ats_occ_cb (void *cls, | |||
758 | 758 | ||
759 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); | 759 | GNUNET_assert (OCC_TYPE_LOCAL == occ->type); |
760 | GNUNET_assert (NULL != occ->timeout_task); | 760 | GNUNET_assert (NULL != occ->timeout_task); |
761 | GNUNET_free_non_null (occ->emsg); | 761 | GNUNET_free (occ->emsg); |
762 | if (NULL == ac) | 762 | if (NULL == ac) |
763 | { | 763 | { |
764 | GNUNET_asprintf (&occ->emsg, | 764 | GNUNET_asprintf (&occ->emsg, |
@@ -842,7 +842,7 @@ occ_hello_sent_cb (void *cls) | |||
842 | lp2c->ohh = NULL; | 842 | lp2c->ohh = NULL; |
843 | 843 | ||
844 | GNUNET_assert (NULL == occ->send_hello_task); | 844 | GNUNET_assert (NULL == occ->send_hello_task); |
845 | GNUNET_free_non_null (occ->emsg); | 845 | GNUNET_free (occ->emsg); |
846 | 846 | ||
847 | GNUNET_asprintf (&occ->emsg, | 847 | GNUNET_asprintf (&occ->emsg, |
848 | "0x%llx: Timeout while acquiring ATS of %s from cache", | 848 | "0x%llx: Timeout while acquiring ATS of %s from cache", |
@@ -1092,7 +1092,7 @@ hello_update_cb (void *cls, | |||
1092 | GST_connection_pool_get_handle_done (occ->cgh_p1th); | 1092 | GST_connection_pool_get_handle_done (occ->cgh_p1th); |
1093 | occ->cgh_p1th = NULL; | 1093 | occ->cgh_p1th = NULL; |
1094 | occ->p1th_ = NULL; | 1094 | occ->p1th_ = NULL; |
1095 | GNUNET_free_non_null (occ->emsg); | 1095 | GNUNET_free (occ->emsg); |
1096 | occ->emsg = NULL; | 1096 | occ->emsg = NULL; |
1097 | p2_transport_connect (occ); | 1097 | p2_transport_connect (occ); |
1098 | } | 1098 | } |
@@ -1118,7 +1118,7 @@ p1_transport_connect_cache_callback (void *cls, | |||
1118 | { | 1118 | { |
1119 | struct OverlayConnectContext *occ = cls; | 1119 | struct OverlayConnectContext *occ = cls; |
1120 | 1120 | ||
1121 | GNUNET_free_non_null (occ->emsg); | 1121 | GNUNET_free (occ->emsg); |
1122 | occ->emsg = NULL; | 1122 | occ->emsg = NULL; |
1123 | if (NULL == th) | 1123 | if (NULL == th) |
1124 | { | 1124 | { |
@@ -1166,7 +1166,7 @@ occ_cache_get_handle_core_cb (void *cls, | |||
1166 | const struct GNUNET_MessageHeader *hello; | 1166 | const struct GNUNET_MessageHeader *hello; |
1167 | 1167 | ||
1168 | GNUNET_assert (NULL != occ->timeout_task); | 1168 | GNUNET_assert (NULL != occ->timeout_task); |
1169 | GNUNET_free_non_null (occ->emsg); | 1169 | GNUNET_free (occ->emsg); |
1170 | if ((NULL == ch) || (NULL == my_identity)) | 1170 | if ((NULL == ch) || (NULL == my_identity)) |
1171 | { | 1171 | { |
1172 | GNUNET_asprintf (&occ->emsg, | 1172 | GNUNET_asprintf (&occ->emsg, |
@@ -1249,7 +1249,7 @@ overlay_connect_get_config (void *cls, | |||
1249 | cmsg = | 1249 | cmsg = |
1250 | (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg; | 1250 | (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg; |
1251 | occ->other_peer_identity = cmsg->peer_identity; | 1251 | occ->other_peer_identity = cmsg->peer_identity; |
1252 | GNUNET_free_non_null (occ->emsg); | 1252 | GNUNET_free (occ->emsg); |
1253 | GNUNET_asprintf (&occ->emsg, | 1253 | GNUNET_asprintf (&occ->emsg, |
1254 | "0x%llx: Timeout while connecting to CORE of peer with " | 1254 | "0x%llx: Timeout while connecting to CORE of peer with " |
1255 | "id: %u", | 1255 | "id: %u", |
@@ -1508,7 +1508,7 @@ p2_controller_connect_cb (void *cls, | |||
1508 | &cmsg.header, | 1508 | &cmsg.header, |
1509 | &overlay_connect_get_config, | 1509 | &overlay_connect_get_config, |
1510 | occ); | 1510 | occ); |
1511 | GNUNET_free_non_null (occ->emsg); | 1511 | GNUNET_free (occ->emsg); |
1512 | GNUNET_asprintf (&occ->emsg, | 1512 | GNUNET_asprintf (&occ->emsg, |
1513 | "0x%llx: Timeout while getting peer identity of peer " | 1513 | "0x%llx: Timeout while getting peer identity of peer " |
1514 | "with id: %u", | 1514 | "with id: %u", |
@@ -1674,7 +1674,7 @@ cleanup_rocc (struct RemoteOverlayConnectCtx *rocc) | |||
1674 | if ((GNUNET_YES == rocc->peer->destroy_flag) && | 1674 | if ((GNUNET_YES == rocc->peer->destroy_flag) && |
1675 | (0 == rocc->peer->reference_cnt)) | 1675 | (0 == rocc->peer->reference_cnt)) |
1676 | GST_destroy_peer (rocc->peer); | 1676 | GST_destroy_peer (rocc->peer); |
1677 | GNUNET_free_non_null (rocc->hello); | 1677 | GNUNET_free (rocc->hello); |
1678 | GNUNET_CONTAINER_DLL_remove (roccq_head, | 1678 | GNUNET_CONTAINER_DLL_remove (roccq_head, |
1679 | roccq_tail, | 1679 | roccq_tail, |
1680 | rocc); | 1680 | rocc); |
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c index d3d597d4f..0184635fa 100644 --- a/src/testbed/gnunet-service-testbed_peers.c +++ b/src/testbed/gnunet-service-testbed_peers.c | |||
@@ -1084,7 +1084,7 @@ handle_peer_reconfigure (void *cls, | |||
1084 | GST_send_operation_success_msg (client, | 1084 | GST_send_operation_success_msg (client, |
1085 | op_id); | 1085 | op_id); |
1086 | GNUNET_SERVICE_client_continue (client); | 1086 | GNUNET_SERVICE_client_continue (client); |
1087 | GNUNET_free_non_null (emsg); | 1087 | GNUNET_free (emsg); |
1088 | return; | 1088 | return; |
1089 | } | 1089 | } |
1090 | prc = GNUNET_new (struct PeerReconfigureContext); | 1090 | prc = GNUNET_new (struct PeerReconfigureContext); |
@@ -1264,7 +1264,7 @@ ret: | |||
1264 | else | 1264 | else |
1265 | GST_send_operation_success_msg (mctx->client, | 1265 | GST_send_operation_success_msg (mctx->client, |
1266 | mctx->op_id); | 1266 | mctx->op_id); |
1267 | GNUNET_free_non_null (emsg); | 1267 | GNUNET_free (emsg); |
1268 | cleanup_mctx (mctx); | 1268 | cleanup_mctx (mctx); |
1269 | } | 1269 | } |
1270 | 1270 | ||
@@ -1459,7 +1459,7 @@ GST_destroy_peers () | |||
1459 | } | 1459 | } |
1460 | GNUNET_free (peer); | 1460 | GNUNET_free (peer); |
1461 | } | 1461 | } |
1462 | GNUNET_free_non_null (GST_peer_list); | 1462 | GNUNET_free (GST_peer_list); |
1463 | GST_peer_list = NULL; | 1463 | GST_peer_list = NULL; |
1464 | GST_peer_list_size = 0; | 1464 | GST_peer_list_size = 0; |
1465 | } | 1465 | } |
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c index 8b67523a1..353cc2881 100644 --- a/src/testbed/gnunet_testbed_mpi_spawn.c +++ b/src/testbed/gnunet_testbed_mpi_spawn.c | |||
@@ -321,7 +321,7 @@ main (int argc, char *argv[]) | |||
321 | GNUNET_SIGNAL_handler_uninstall (shc_chld); | 321 | GNUNET_SIGNAL_handler_uninstall (shc_chld); |
322 | shc_chld = NULL; | 322 | shc_chld = NULL; |
323 | GNUNET_DISK_pipe_close (sigpipe); | 323 | GNUNET_DISK_pipe_close (sigpipe); |
324 | GNUNET_free_non_null (fn); | 324 | GNUNET_free (fn); |
325 | if (GNUNET_OK != ret) | 325 | if (GNUNET_OK != ret) |
326 | return ret; | 326 | return ret; |
327 | return 0; | 327 | return 0; |
diff --git a/src/testbed/test_gnunet_helper_testbed.c b/src/testbed/test_gnunet_helper_testbed.c index 7c4d4bad5..d4eec0269 100644 --- a/src/testbed/test_gnunet_helper_testbed.c +++ b/src/testbed/test_gnunet_helper_testbed.c | |||
@@ -88,7 +88,7 @@ do_shutdown (void *cls) | |||
88 | GNUNET_SCHEDULER_cancel (abort_task); | 88 | GNUNET_SCHEDULER_cancel (abort_task); |
89 | if (NULL != helper) | 89 | if (NULL != helper) |
90 | GNUNET_HELPER_stop (helper, GNUNET_NO); | 90 | GNUNET_HELPER_stop (helper, GNUNET_NO); |
91 | GNUNET_free_non_null (msg); | 91 | GNUNET_free (msg); |
92 | if (NULL != cfg) | 92 | if (NULL != cfg) |
93 | GNUNET_CONFIGURATION_destroy (cfg); | 93 | GNUNET_CONFIGURATION_destroy (cfg); |
94 | } | 94 | } |
diff --git a/src/testbed/test_testbed_api_statistics.c b/src/testbed/test_testbed_api_statistics.c index 2d0e2d6b8..dc305d008 100644 --- a/src/testbed/test_testbed_api_statistics.c +++ b/src/testbed/test_testbed_api_statistics.c | |||
@@ -198,7 +198,7 @@ main (int argc, char **argv) | |||
198 | NUM_PEERS, | 198 | NUM_PEERS, |
199 | 1LL, NULL, NULL, | 199 | 1LL, NULL, NULL, |
200 | &test_master, NULL); | 200 | &test_master, NULL); |
201 | GNUNET_free_non_null (seen_peers); | 201 | GNUNET_free (seen_peers); |
202 | if (GNUNET_OK != result) | 202 | if (GNUNET_OK != result) |
203 | return 1; | 203 | return 1; |
204 | return 0; | 204 | return 0; |
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 9fe5bccdc..697783d96 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -1178,7 +1178,7 @@ handle_link_controllers_result ( | |||
1178 | LOG_DEBUG ("Not calling callback\n"); | 1178 | LOG_DEBUG ("Not calling callback\n"); |
1179 | if (NULL != cfg) | 1179 | if (NULL != cfg) |
1180 | GNUNET_CONFIGURATION_destroy (cfg); | 1180 | GNUNET_CONFIGURATION_destroy (cfg); |
1181 | GNUNET_free_non_null (emsg); | 1181 | GNUNET_free (emsg); |
1182 | } | 1182 | } |
1183 | 1183 | ||
1184 | 1184 | ||
@@ -1314,7 +1314,7 @@ handle_barrier_status (void *cls, | |||
1314 | return; /* just initialised; skip cleanup */ | 1314 | return; /* just initialised; skip cleanup */ |
1315 | 1315 | ||
1316 | cleanup: | 1316 | cleanup: |
1317 | GNUNET_free_non_null (emsg); | 1317 | GNUNET_free (emsg); |
1318 | /** | 1318 | /** |
1319 | * Do not remove the barrier if we did not echo the status back; this is | 1319 | * Do not remove the barrier if we did not echo the status back; this is |
1320 | * required at the chained testbed controller setup to ensure the only the | 1320 | * required at the chained testbed controller setup to ensure the only the |
@@ -1459,7 +1459,7 @@ oprelease_link_controllers (void *cls) | |||
1459 | case OPC_STATE_FINISHED: | 1459 | case OPC_STATE_FINISHED: |
1460 | break; | 1460 | break; |
1461 | } | 1461 | } |
1462 | GNUNET_free_non_null (data); | 1462 | GNUNET_free (data); |
1463 | GNUNET_free (opc); | 1463 | GNUNET_free (opc); |
1464 | } | 1464 | } |
1465 | 1465 | ||
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 95463e44d..f7352250d 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c | |||
@@ -506,7 +506,7 @@ GNUNET_TESTBED_hosts_load_from_file ( | |||
506 | else | 506 | else |
507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); | 507 | (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); |
508 | count++; | 508 | count++; |
509 | GNUNET_free_non_null (username); | 509 | GNUNET_free (username); |
510 | GNUNET_free (hostname); | 510 | GNUNET_free (hostname); |
511 | buf = &data[offset + 1]; | 511 | buf = &data[offset + 1]; |
512 | } | 512 | } |
@@ -611,26 +611,27 @@ GNUNET_TESTBED_hosts_load_from_loadleveler ( | |||
611 | void | 611 | void |
612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) | 612 | GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) |
613 | { | 613 | { |
614 | struct RegisteredController *rc; | ||
615 | uint32_t id; | ||
616 | |||
617 | GNUNET_assert (host->id < host_list_size); | 614 | GNUNET_assert (host->id < host_list_size); |
618 | GNUNET_assert (host_list[host->id] == host); | 615 | GNUNET_assert (host_list[host->id] == host); |
619 | host_list[host->id] = NULL; | 616 | host_list[host->id] = NULL; |
620 | /* clear registered controllers list */ | 617 | /* clear registered controllers list */ |
621 | for (rc = host->rc_head; NULL != rc; rc = host->rc_head) | 618 | for (struct RegisteredController *rc = host->rc_head; |
619 | NULL != rc; | ||
620 | rc = host->rc_head) | ||
622 | { | 621 | { |
623 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); | 622 | GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); |
624 | GNUNET_free (rc); | 623 | GNUNET_free (rc); |
625 | } | 624 | } |
626 | GNUNET_free_non_null ((char *) host->username); | 625 | GNUNET_free_nz ((char *) host->username); |
627 | GNUNET_free_non_null ((char *) host->hostname); | 626 | GNUNET_free_nz ((char *) host->hostname); |
628 | GNUNET_TESTBED_operation_queue_destroy_ ( | 627 | GNUNET_TESTBED_operation_queue_destroy_ ( |
629 | host->opq_parallel_overlay_connect_operations); | 628 | host->opq_parallel_overlay_connect_operations); |
630 | GNUNET_CONFIGURATION_destroy (host->cfg); | 629 | GNUNET_CONFIGURATION_destroy (host->cfg); |
631 | GNUNET_free (host); | 630 | GNUNET_free (host); |
632 | while (host_list_size >= HOST_LIST_GROW_STEP) | 631 | while (host_list_size >= HOST_LIST_GROW_STEP) |
633 | { | 632 | { |
633 | uint32_t id; | ||
634 | |||
634 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; | 635 | for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; |
635 | id--) | 636 | id--) |
636 | if (NULL != host_list[id]) | 637 | if (NULL != host_list[id]) |
@@ -1223,7 +1224,7 @@ GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc *cproc) | |||
1223 | free_argv (cproc->helper_argv); | 1224 | free_argv (cproc->helper_argv); |
1224 | cproc->host->controller_started = GNUNET_NO; | 1225 | cproc->host->controller_started = GNUNET_NO; |
1225 | cproc->host->locked = GNUNET_NO; | 1226 | cproc->host->locked = GNUNET_NO; |
1226 | GNUNET_free_non_null (cproc->msg); | 1227 | GNUNET_free (cproc->msg); |
1227 | GNUNET_free (cproc); | 1228 | GNUNET_free (cproc); |
1228 | } | 1229 | } |
1229 | 1230 | ||
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c index a406c0e0b..ae85e0842 100644 --- a/src/testbed/testbed_api_operations.c +++ b/src/testbed/testbed_api_operations.c | |||
@@ -696,7 +696,7 @@ decide_capacity (struct OperationQueue *opq, | |||
696 | } | 696 | } |
697 | 697 | ||
698 | ret: | 698 | ret: |
699 | GNUNET_free_non_null (evict_entries); | 699 | GNUNET_free (evict_entries); |
700 | if (NULL != ops_) | 700 | if (NULL != ops_) |
701 | *ops_ = ops; | 701 | *ops_ = ops; |
702 | else | 702 | else |
@@ -771,7 +771,7 @@ check_readiness (struct GNUNET_TESTBED_Operation *op) | |||
771 | if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i], | 771 | if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i], |
772 | &ops, &n_ops)) | 772 | &ops, &n_ops)) |
773 | { | 773 | { |
774 | GNUNET_free_non_null (evict_ops); | 774 | GNUNET_free (evict_ops); |
775 | return GNUNET_NO; | 775 | return GNUNET_NO; |
776 | } | 776 | } |
777 | if (NULL == ops) | 777 | if (NULL == ops) |
@@ -842,7 +842,7 @@ cleanup_tslots (struct OperationQueue *queue) | |||
842 | continue; | 842 | continue; |
843 | GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot); | 843 | GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot); |
844 | } | 844 | } |
845 | GNUNET_free_non_null (fctx->tslots_freeptr); | 845 | GNUNET_free (fctx->tslots_freeptr); |
846 | fctx->tslots_freeptr = NULL; | 846 | fctx->tslots_freeptr = NULL; |
847 | fctx->alloc_head = NULL; | 847 | fctx->alloc_head = NULL; |
848 | fctx->alloc_tail = NULL; | 848 | fctx->alloc_tail = NULL; |
@@ -1337,7 +1337,7 @@ GNUNET_TESTBED_operation_release_ (struct GNUNET_TESTBED_Operation *op) | |||
1337 | } | 1337 | } |
1338 | GNUNET_free (entry); | 1338 | GNUNET_free (entry); |
1339 | } | 1339 | } |
1340 | GNUNET_free_non_null (op->qentries); | 1340 | GNUNET_free (op->qentries); |
1341 | GNUNET_free (op->queues); | 1341 | GNUNET_free (op->queues); |
1342 | GNUNET_free (op->nres); | 1342 | GNUNET_free (op->nres); |
1343 | if (NULL != op->release) | 1343 | if (NULL != op->release) |
@@ -1376,7 +1376,7 @@ GNUNET_TESTBED_operations_fini () | |||
1376 | warn = 1; | 1376 | warn = 1; |
1377 | queue_destroy (queue); | 1377 | queue_destroy (queue); |
1378 | } | 1378 | } |
1379 | GNUNET_free_non_null (expired_opqs); | 1379 | GNUNET_free (expired_opqs); |
1380 | n_expired_opqs = 0; | 1380 | n_expired_opqs = 0; |
1381 | if (warn) | 1381 | if (warn) |
1382 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1382 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c index 7bd895871..99d30e85b 100644 --- a/src/testbed/testbed_api_peers.c +++ b/src/testbed/testbed_api_peers.c | |||
@@ -952,7 +952,7 @@ oprelease_manage_service (void *cls) | |||
952 | case OPC_STATE_FINISHED: | 952 | case OPC_STATE_FINISHED: |
953 | break; | 953 | break; |
954 | } | 954 | } |
955 | GNUNET_free_non_null (data); | 955 | GNUNET_free (data); |
956 | GNUNET_free (opc); | 956 | GNUNET_free (opc); |
957 | } | 957 | } |
958 | 958 | ||
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c index 4858208cc..7fe47d2a0 100644 --- a/src/testbed/testbed_api_statistics.c +++ b/src/testbed/testbed_api_statistics.c | |||
@@ -378,8 +378,8 @@ oprelease_get_stats (void *cls) | |||
378 | } | 378 | } |
379 | GNUNET_free (sc->ops); | 379 | GNUNET_free (sc->ops); |
380 | } | 380 | } |
381 | GNUNET_free_non_null (sc->subsystem); | 381 | GNUNET_free (sc->subsystem); |
382 | GNUNET_free_non_null (sc->name); | 382 | GNUNET_free (sc->name); |
383 | GNUNET_free (sc); | 383 | GNUNET_free (sc); |
384 | if (GNUNET_YES == | 384 | if (GNUNET_YES == |
385 | GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) | 385 | GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) |
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c index 7be8054ca..7ae30e0c6 100644 --- a/src/testbed/testbed_api_testbed.c +++ b/src/testbed/testbed_api_testbed.c | |||
@@ -472,11 +472,11 @@ cleanup (struct GNUNET_TESTBED_RunHandle *rc) | |||
472 | GNUNET_TESTBED_host_destroy (rc->h); | 472 | GNUNET_TESTBED_host_destroy (rc->h); |
473 | for (hid = 0; hid < rc->num_hosts; hid++) | 473 | for (hid = 0; hid < rc->num_hosts; hid++) |
474 | GNUNET_TESTBED_host_destroy (rc->hosts[hid]); | 474 | GNUNET_TESTBED_host_destroy (rc->hosts[hid]); |
475 | GNUNET_free_non_null (rc->hosts); | 475 | GNUNET_free (rc->hosts); |
476 | if (NULL != rc->cfg) | 476 | if (NULL != rc->cfg) |
477 | GNUNET_CONFIGURATION_destroy (rc->cfg); | 477 | GNUNET_CONFIGURATION_destroy (rc->cfg); |
478 | GNUNET_free_non_null (rc->topo_file); | 478 | GNUNET_free (rc->topo_file); |
479 | GNUNET_free_non_null (rc->trusted_ip); | 479 | GNUNET_free (rc->trusted_ip); |
480 | GNUNET_free (rc); | 480 | GNUNET_free (rc); |
481 | } | 481 | } |
482 | 482 | ||
@@ -863,7 +863,7 @@ event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event) | |||
863 | case RC_PEERS_CREATED: | 863 | case RC_PEERS_CREATED: |
864 | case RC_READY: | 864 | case RC_READY: |
865 | rc->state = RC_PEERS_SHUTDOWN; | 865 | rc->state = RC_PEERS_SHUTDOWN; |
866 | GNUNET_free_non_null (rc->peers); | 866 | GNUNET_free (rc->peers); |
867 | rc->peers = NULL; | 867 | rc->peers = NULL; |
868 | DEBUG ("Peers shut down in %s\n", prof_time (rc)); | 868 | DEBUG ("Peers shut down in %s\n", prof_time (rc)); |
869 | GNUNET_SCHEDULER_shutdown (); | 869 | GNUNET_SCHEDULER_shutdown (); |
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c index 9ffe7f47d..1d765af92 100644 --- a/src/testbed/testbed_api_topology.c +++ b/src/testbed/testbed_api_topology.c | |||
@@ -1183,7 +1183,7 @@ _exit: | |||
1183 | struct TopologyContextOverlay *overlay; | 1183 | struct TopologyContextOverlay *overlay; |
1184 | 1184 | ||
1185 | overlay = &tc->u.overlay; | 1185 | overlay = &tc->u.overlay; |
1186 | GNUNET_free_non_null (overlay->link_array); | 1186 | GNUNET_free (overlay->link_array); |
1187 | overlay->link_array = NULL; | 1187 | overlay->link_array = NULL; |
1188 | } | 1188 | } |
1189 | break; | 1189 | break; |
@@ -1193,7 +1193,7 @@ _exit: | |||
1193 | struct TopologyContextUnderlay *underlay; | 1193 | struct TopologyContextUnderlay *underlay; |
1194 | 1194 | ||
1195 | underlay = &tc->u.underlay; | 1195 | underlay = &tc->u.underlay; |
1196 | GNUNET_free_non_null (underlay->link_array); | 1196 | GNUNET_free (underlay->link_array); |
1197 | underlay->link_array = NULL; | 1197 | underlay->link_array = NULL; |
1198 | } | 1198 | } |
1199 | break; | 1199 | break; |
@@ -1428,7 +1428,7 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls, | |||
1428 | default: | 1428 | default: |
1429 | GNUNET_break (0); /* Should not use any other option apart from | 1429 | GNUNET_break (0); /* Should not use any other option apart from |
1430 | * the ones handled here */ | 1430 | * the ones handled here */ |
1431 | GNUNET_free_non_null (overlay->link_array); | 1431 | GNUNET_free (overlay->link_array); |
1432 | GNUNET_free (tc); | 1432 | GNUNET_free (tc); |
1433 | return NULL; | 1433 | return NULL; |
1434 | } | 1434 | } |
@@ -1653,7 +1653,7 @@ GNUNET_TESTBED_underlay_construct_ (int num_peers, | |||
1653 | break; | 1653 | break; |
1654 | } | 1654 | } |
1655 | } | 1655 | } |
1656 | GNUNET_free_non_null (underlay->link_array); | 1656 | GNUNET_free (underlay->link_array); |
1657 | return ret; | 1657 | return ret; |
1658 | } | 1658 | } |
1659 | 1659 | ||