diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-27 14:26:17 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-27 14:26:17 +0000 |
commit | 0ee59577ee81b92ee492491f4d685f26bc186c17 (patch) | |
tree | 8643d5559078e8164d9ddc9f77ec1f3c760125a4 | |
parent | 413b5166b253c938e65d9c5ddd28ed85c93e8835 (diff) | |
download | gnunet-0ee59577ee81b92ee492491f4d685f26bc186c17.tar.gz gnunet-0ee59577ee81b92ee492491f4d685f26bc186c17.zip |
coverity and codesonar fixes
-rw-r--r-- | src/testing/test_testing_group_remote.c | 8 | ||||
-rw-r--r-- | src/testing/test_testing_topology_blacklist.c | 24 |
2 files changed, 28 insertions, 4 deletions
diff --git a/src/testing/test_testing_group_remote.c b/src/testing/test_testing_group_remote.c index 74841fb43..6b7fabb31 100644 --- a/src/testing/test_testing_group_remote.c +++ b/src/testing/test_testing_group_remote.c | |||
@@ -93,8 +93,12 @@ run (void *cls, | |||
93 | &num_peers)) | 93 | &num_peers)) |
94 | num_peers = DEFAULT_NUM_PEERS; | 94 | num_peers = DEFAULT_NUM_PEERS; |
95 | 95 | ||
96 | GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "hosts", | 96 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "hosts", |
97 | &hostnames); | 97 | &hostnames)) |
98 | { | ||
99 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "No hosts specified, running all tests on localhost\n"); | ||
100 | } | ||
101 | |||
98 | 102 | ||
99 | peers_left = num_peers; | 103 | peers_left = num_peers; |
100 | pg = GNUNET_TESTING_daemons_start (sched, | 104 | pg = GNUNET_TESTING_daemons_start (sched, |
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c index 22d2265c5..9788fa87c 100644 --- a/src/testing/test_testing_topology_blacklist.c +++ b/src/testing/test_testing_topology_blacklist.c | |||
@@ -377,6 +377,10 @@ run (void *cls, | |||
377 | if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string(cfg, "paths", "servicehome", &test_directory)) | 377 | if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string(cfg, "paths", "servicehome", &test_directory)) |
378 | { | 378 | { |
379 | ok = 404; | 379 | ok = 404; |
380 | if (dotOutFile != NULL) | ||
381 | { | ||
382 | fclose(dotOutFile); | ||
383 | } | ||
380 | return; | 384 | return; |
381 | } | 385 | } |
382 | 386 | ||
@@ -407,11 +411,27 @@ run (void *cls, | |||
407 | "connect_topology_option_modifier", | 411 | "connect_topology_option_modifier", |
408 | "TESTING"); | 412 | "TESTING"); |
409 | GNUNET_free (connect_topology_option_modifier_string); | 413 | GNUNET_free (connect_topology_option_modifier_string); |
414 | ok = 707; | ||
415 | if (dotOutFile != NULL) | ||
416 | { | ||
417 | fclose(dotOutFile); | ||
418 | } | ||
419 | return; | ||
410 | } | 420 | } |
421 | GNUNET_free (connect_topology_option_modifier_string); | ||
411 | } | 422 | } |
412 | 423 | ||
413 | GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "blacklist_transports", | 424 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "blacklist_transports", |
414 | &blacklist_transports); | 425 | &blacklist_transports)) |
426 | { | ||
427 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "No transports specified for blacklisting in blacklist testcase (this shouldn't happen!)\n"); | ||
428 | ok = 808; | ||
429 | if (dotOutFile != NULL) | ||
430 | { | ||
431 | fclose(dotOutFile); | ||
432 | } | ||
433 | return; | ||
434 | } | ||
415 | 435 | ||
416 | if (GNUNET_YES == | 436 | if (GNUNET_YES == |
417 | GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "blacklist_topology", | 437 | GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "blacklist_topology", |