aboutsummaryrefslogtreecommitdiff
path: root/src/ats
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
commite31c1d4a9f78c4e31fda1f98fe349b33abdd01a2 (patch)
tree61df772a93f7f21af7c715ddd4b9a3f1a50e0509 /src/ats
parent1437556645417e6302862845e7ebcbd4c9908357 (diff)
downloadgnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz
gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/ats')
-rw-r--r--src/ats/gnunet-ats-solver-eval.c20
-rw-r--r--src/ats/perf_ats_solver.c12
-rw-r--r--src/ats/plugin_ats_proportional.c2
-rw-r--r--src/ats/test_ats_lib.c4
4 files changed, 19 insertions, 19 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c
index 6a014357e..25b963532 100644
--- a/src/ats/gnunet-ats-solver-eval.c
+++ b/src/ats/gnunet-ats-solver-eval.c
@@ -1307,17 +1307,17 @@ free_experiment (struct Experiment *e)
1307 for (cur_o = next_o; NULL != cur_o; cur_o = next_o) 1307 for (cur_o = next_o; NULL != cur_o; cur_o = next_o)
1308 { 1308 {
1309 next_o = cur_o->next; 1309 next_o = cur_o->next;
1310 GNUNET_free_non_null (cur_o->address); 1310 GNUNET_free (cur_o->address);
1311 GNUNET_free_non_null (cur_o->plugin); 1311 GNUNET_free (cur_o->plugin);
1312 GNUNET_free (cur_o); 1312 GNUNET_free (cur_o);
1313 } 1313 }
1314 GNUNET_free (cur); 1314 GNUNET_free (cur);
1315 } 1315 }
1316 1316
1317 GNUNET_free_non_null (e->name); 1317 GNUNET_free (e->name);
1318 GNUNET_free_non_null (e->log_prefix); 1318 GNUNET_free (e->log_prefix);
1319 GNUNET_free_non_null (e->log_output_dir); 1319 GNUNET_free (e->log_output_dir);
1320 GNUNET_free_non_null (e->cfg_file); 1320 GNUNET_free (e->cfg_file);
1321 GNUNET_free (e); 1321 GNUNET_free (e);
1322} 1322}
1323 1323
@@ -1967,7 +1967,7 @@ load_op_start_set_property (struct GNUNET_ATS_TEST_Operation *o,
1967 fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n", 1967 fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n",
1968 op_counter, op_name, e->id); 1968 op_counter, op_name, e->id);
1969 GNUNET_free (op_name); 1969 GNUNET_free (op_name);
1970 GNUNET_free_non_null (prop); 1970 GNUNET_free (prop);
1971 return GNUNET_SYSERR; 1971 return GNUNET_SYSERR;
1972 } 1972 }
1973 1973
@@ -2038,7 +2038,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
2038 fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n", 2038 fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n",
2039 op_counter, "STOP_SET_PROPERTY", op_name); 2039 op_counter, "STOP_SET_PROPERTY", op_name);
2040 GNUNET_free (op_name); 2040 GNUNET_free (op_name);
2041 GNUNET_free_non_null (pref); 2041 GNUNET_free (pref);
2042 return GNUNET_SYSERR; 2042 return GNUNET_SYSERR;
2043 } 2043 }
2044 2044
@@ -2047,7 +2047,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
2047 fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n", 2047 fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n",
2048 op_counter, op_name, e->id); 2048 op_counter, op_name, e->id);
2049 GNUNET_free (op_name); 2049 GNUNET_free (op_name);
2050 GNUNET_free_non_null (pref); 2050 GNUNET_free (pref);
2051 return GNUNET_SYSERR; 2051 return GNUNET_SYSERR;
2052 } 2052 }
2053 2053
@@ -2419,7 +2419,7 @@ enforce_del_address (struct GNUNET_ATS_TEST_Operation *op)
2419 } 2419 }
2420 GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a); 2420 GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a);
2421 2421
2422 GNUNET_free_non_null (a->ats_addr->atsi); 2422 GNUNET_free (a->ats_addr->atsi);
2423 GNUNET_free (a->ats_addr); 2423 GNUNET_free (a->ats_addr);
2424 GNUNET_free (a); 2424 GNUNET_free (a);
2425} 2425}
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c
index 8e20f4454..2fbadef4d 100644
--- a/src/ats/perf_ats_solver.c
+++ b/src/ats/perf_ats_solver.c
@@ -325,8 +325,8 @@ end_now (int res)
325 ph.stat = NULL; 325 ph.stat = NULL;
326 } 326 }
327 327
328 GNUNET_free_non_null (ph.peers); 328 GNUNET_free (ph.peers);
329 GNUNET_free_non_null (ph.iterations_results); 329 GNUNET_free (ph.iterations_results);
330 330
331 GAS_normalization_stop (); 331 GAS_normalization_stop ();
332 GAS_preference_done (); 332 GAS_preference_done ();
@@ -1090,13 +1090,13 @@ write_all_iterations (void)
1090 if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full))) 1090 if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full)))
1091 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", 1091 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
1092 data_fn_full); 1092 data_fn_full);
1093 GNUNET_free_non_null (data_fn_full); 1093 GNUNET_free (data_fn_full);
1094 1094
1095 if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close ( 1095 if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close (
1096 f_update))) 1096 f_update)))
1097 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", 1097 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
1098 data_fn_update); 1098 data_fn_update);
1099 GNUNET_free_non_null (data_fn_update); 1099 GNUNET_free (data_fn_update);
1100} 1100}
1101 1101
1102 1102
@@ -1115,7 +1115,7 @@ do_delete_address (void *cls,
1115 pid, 1115 pid,
1116 cur)); 1116 cur));
1117 ph.sf->s_del (ph.sf->cls, cur); 1117 ph.sf->s_del (ph.sf->cls, cur);
1118 GNUNET_free_non_null (cur->atsi); 1118 GNUNET_free (cur->atsi);
1119 GNUNET_free (cur); 1119 GNUNET_free (cur);
1120 return GNUNET_OK; 1120 return GNUNET_OK;
1121} 1121}
@@ -1427,7 +1427,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1427 if (0 == c2) 1427 if (0 == c2)
1428 continue; 1428 continue;
1429 if (ph.measure_updates) 1429 if (ph.measure_updates)
1430 GNUNET_free_non_null ( 1430 GNUNET_free (
1431 ph.iterations_results[c].update_results_array[c2]); 1431 ph.iterations_results[c].update_results_array[c2]);
1432 GNUNET_free (ph.iterations_results[c].results_array[c2]); 1432 GNUNET_free (ph.iterations_results[c].results_array[c2]);
1433 } 1433 }
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index f4324d238..f554291b6 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -1225,7 +1225,7 @@ libgnunet_plugin_ats_proportional_done (void *cls)
1225 GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head, 1225 GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head,
1226 s->network_entries[c].tail, 1226 s->network_entries[c].tail,
1227 cur); 1227 cur);
1228 GNUNET_free_non_null (cur->addr->solver_information); 1228 GNUNET_free (cur->addr->solver_information);
1229 GNUNET_free (cur); 1229 GNUNET_free (cur);
1230 } 1230 }
1231 GNUNET_free (s->network_entries[c].stat_total); 1231 GNUNET_free (s->network_entries[c].stat_total);
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c
index 2c4d3f5ad..d19da0106 100644
--- a/src/ats/test_ats_lib.c
+++ b/src/ats/test_ats_lib.c
@@ -165,7 +165,7 @@ free_asd (void *cls,
165 GNUNET_CONTAINER_multipeermap_remove (p2asd, 165 GNUNET_CONTAINER_multipeermap_remove (p2asd,
166 key, 166 key,
167 asd)); 167 asd));
168 GNUNET_free_non_null (asd->address); 168 GNUNET_free (asd->address);
169 GNUNET_free (asd); 169 GNUNET_free (asd);
170 return GNUNET_OK; 170 return GNUNET_OK;
171} 171}
@@ -951,7 +951,7 @@ address_suggest_cb (void *cls,
951 asd->bandwidth_out = bandwidth_out; 951 asd->bandwidth_out = bandwidth_out;
952 asd->bandwidth_in = bandwidth_in; 952 asd->bandwidth_in = bandwidth_in;
953 asd->session = session; 953 asd->session = session;
954 GNUNET_free_non_null (asd->address); 954 GNUNET_free (asd->address);
955 asd->address = NULL; 955 asd->address = NULL;
956 if (NULL != address) 956 if (NULL != address)
957 asd->address = GNUNET_HELLO_address_copy (address); 957 asd->address = GNUNET_HELLO_address_copy (address);