diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-09-01 13:21:03 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-09-01 13:21:03 +0000 |
commit | 930871b49ea5ba14a92c6c0ed8e3ecc648da0b22 (patch) | |
tree | 280392bf53902b59073055c066fe1ebd69b43c7c /src/testing/test_testing_topology.c | |
parent | 05186db103486d199c2dc9357264a265e9c33117 (diff) | |
download | gnunet-930871b49ea5ba14a92c6c0ed8e3ecc648da0b22.tar.gz gnunet-930871b49ea5ba14a92c6c0ed8e3ecc648da0b22.zip |
klocwork fixes
Diffstat (limited to 'src/testing/test_testing_topology.c')
-rw-r--r-- | src/testing/test_testing_topology.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c index 3d03d7611..af4a6a39f 100644 --- a/src/testing/test_testing_topology.c +++ b/src/testing/test_testing_topology.c | |||
@@ -200,8 +200,6 @@ finish_testing () | |||
200 | "Called finish testing, stopping daemons.\n"); | 200 | "Called finish testing, stopping daemons.\n"); |
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | int count; | ||
204 | count = 0; | ||
205 | pos = test_messages; | 203 | pos = test_messages; |
206 | while (pos != NULL) | 204 | while (pos != NULL) |
207 | { | 205 | { |
@@ -377,6 +375,7 @@ process_mtype (void *cls, | |||
377 | GNUNET_SCHEDULER_cancel (sched, die_task); | 375 | GNUNET_SCHEDULER_cancel (sched, die_task); |
378 | GNUNET_asprintf(&dotOutFileNameFinished, "%s.dot", "final_topology"); | 376 | GNUNET_asprintf(&dotOutFileNameFinished, "%s.dot", "final_topology"); |
379 | dotOutFileFinished = fopen (dotOutFileNameFinished, "w"); | 377 | dotOutFileFinished = fopen (dotOutFileNameFinished, "w"); |
378 | GNUNET_free(dotOutFileNameFinished); | ||
380 | if (dotOutFileFinished != NULL) | 379 | if (dotOutFileFinished != NULL) |
381 | { | 380 | { |
382 | fprintf(dotOutFileFinished, "strict graph G {\n"); | 381 | fprintf(dotOutFileFinished, "strict graph G {\n"); |
@@ -1001,6 +1000,7 @@ run (void *cls, | |||
1001 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), | 1000 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), |
1002 | &end_badly, "didn't generate all hostkeys within a reasonable amount of time!!!"); | 1001 | &end_badly, "didn't generate all hostkeys within a reasonable amount of time!!!"); |
1003 | 1002 | ||
1003 | GNUNET_assert(num_peers > 0 && num_peers < (unsigned int)-1); | ||
1004 | pg = GNUNET_TESTING_daemons_start (sched, cfg, | 1004 | pg = GNUNET_TESTING_daemons_start (sched, cfg, |
1005 | peers_left, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), &hostkey_callback, NULL, &peers_started_callback, NULL, | 1005 | peers_left, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), &hostkey_callback, NULL, &peers_started_callback, NULL, |
1006 | &topology_callback, NULL, NULL); | 1006 | &topology_callback, NULL, NULL); |
@@ -1046,6 +1046,7 @@ main (int argc, char *argv[]) | |||
1046 | char *our_binary_name; | 1046 | char *our_binary_name; |
1047 | 1047 | ||
1048 | binary_start_pos = rindex(argv[0], '/'); | 1048 | binary_start_pos = rindex(argv[0], '/'); |
1049 | GNUNET_assert(binary_start_pos != NULL); | ||
1049 | topology_string = strstr (binary_start_pos, | 1050 | topology_string = strstr (binary_start_pos, |
1050 | "_topology"); | 1051 | "_topology"); |
1051 | GNUNET_assert (topology_string != NULL); | 1052 | GNUNET_assert (topology_string != NULL); |