aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-11-12 10:49:20 +0000
committerNathan S. Evans <evans@in.tum.de>2010-11-12 10:49:20 +0000
commit15ac26c9d907f388097093b665bada80b3bb9581 (patch)
tree77163ebd721ac71d06729deeec3f8df568f97c33 /src
parent851adcc45d4cf2035447205a38b89dbac0d27b88 (diff)
downloadgnunet-15ac26c9d907f388097093b665bada80b3bb9581.tar.gz
gnunet-15ac26c9d907f388097093b665bada80b3bb9581.zip
coverity fixes
Diffstat (limited to 'src')
-rw-r--r--src/dht/gnunet-dht-driver.c4
-rw-r--r--src/dht/gnunet-service-dht.c2
-rw-r--r--src/dht/plugin_dhtlog_mysql_dump_load.c11
3 files changed, 10 insertions, 7 deletions
diff --git a/src/dht/gnunet-dht-driver.c b/src/dht/gnunet-dht-driver.c
index b59b14813..fdd442cdb 100644
--- a/src/dht/gnunet-dht-driver.c
+++ b/src/dht/gnunet-dht-driver.c
@@ -2050,7 +2050,7 @@ schedule_find_peer_requests (void *cls, const struct GNUNET_SCHEDULER_TaskContex
2050 else /* If we have sent requests, choose peers with a low number of connections to send requests from */ 2050 else /* If we have sent requests, choose peers with a low number of connections to send requests from */
2051 { 2051 {
2052 peer_count = GNUNET_CONTAINER_heap_remove_root(find_peer_ctx->peer_min_heap); 2052 peer_count = GNUNET_CONTAINER_heap_remove_root(find_peer_ctx->peer_min_heap);
2053 GNUNET_CONTAINER_multihashmap_remove(find_peer_ctx->peer_hash, &peer_count->peer_id.hashPubKey, peer_count); 2053 GNUNET_assert(GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove(find_peer_ctx->peer_hash, &peer_count->peer_id.hashPubKey, peer_count));
2054 test_find_peer->daemon = GNUNET_TESTING_daemon_get_by_id(pg, &peer_count->peer_id); 2054 test_find_peer->daemon = GNUNET_TESTING_daemon_get_by_id(pg, &peer_count->peer_id);
2055 GNUNET_assert(test_find_peer->daemon != NULL); 2055 GNUNET_assert(test_find_peer->daemon != NULL);
2056 } 2056 }
@@ -3040,7 +3040,7 @@ run (void *cls,
3040 &num_peers)) 3040 &num_peers))
3041 { 3041 {
3042 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 3042 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
3043 "Number of peers must be specified in section %s option %s\n", topology_str, "TESTING", "NUM_PEERS"); 3043 "Number of peers must be specified in section %s option %s\n", "TESTING", "NUM_PEERS");
3044 } 3044 }
3045 GNUNET_assert(num_peers > 0 && num_peers < ULONG_MAX); 3045 GNUNET_assert(num_peers > 0 && num_peers < ULONG_MAX);
3046 /* Set peers_left so we know when all peers started */ 3046 /* Set peers_left so we know when all peers started */
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 60df8356e..933a208fe 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -1535,7 +1535,7 @@ static void delete_peer (struct PeerInfo *peer,
1535 } 1535 }
1536 1536
1537 GNUNET_assert(GNUNET_CONTAINER_multihashmap_contains(all_known_peers, &peer->id.hashPubKey)); 1537 GNUNET_assert(GNUNET_CONTAINER_multihashmap_contains(all_known_peers, &peer->id.hashPubKey));
1538 GNUNET_CONTAINER_multihashmap_remove (all_known_peers, &peer->id.hashPubKey, peer); 1538 GNUNET_assert(GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove (all_known_peers, &peer->id.hashPubKey, peer));
1539 GNUNET_free(peer); 1539 GNUNET_free(peer);
1540} 1540}
1541 1541
diff --git a/src/dht/plugin_dhtlog_mysql_dump_load.c b/src/dht/plugin_dhtlog_mysql_dump_load.c
index 973b20908..45e0e1afb 100644
--- a/src/dht/plugin_dhtlog_mysql_dump_load.c
+++ b/src/dht/plugin_dhtlog_mysql_dump_load.c
@@ -586,7 +586,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
586 outfile_path, 586 outfile_path,
587 "mysqldump_nodes", 587 "mysqldump_nodes",
588 getpid()); 588 getpid());
589 589 GNUNET_free(fn);
590 fn = GNUNET_STRINGS_filename_expand (outfile_name); 590 fn = GNUNET_STRINGS_filename_expand (outfile_name);
591 591
592 if (fn == NULL) 592 if (fn == NULL)
@@ -619,6 +619,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
619 "mysqldump_routes", 619 "mysqldump_routes",
620 getpid()); 620 getpid());
621 621
622 GNUNET_free(fn);
622 fn = GNUNET_STRINGS_filename_expand (outfile_name); 623 fn = GNUNET_STRINGS_filename_expand (outfile_name);
623 624
624 if (fn == NULL) 625 if (fn == NULL)
@@ -651,6 +652,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
651 "mysqldump_queries", 652 "mysqldump_queries",
652 getpid()); 653 getpid());
653 654
655 GNUNET_free(fn);
654 fn = GNUNET_STRINGS_filename_expand (outfile_name); 656 fn = GNUNET_STRINGS_filename_expand (outfile_name);
655 657
656 if (fn == NULL) 658 if (fn == NULL)
@@ -683,6 +685,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
683 "mysqldump_stats", 685 "mysqldump_stats",
684 getpid()); 686 getpid());
685 687
688 GNUNET_free(fn);
686 fn = GNUNET_STRINGS_filename_expand (outfile_name); 689 fn = GNUNET_STRINGS_filename_expand (outfile_name);
687 690
688 if (fn == NULL) 691 if (fn == NULL)
@@ -714,7 +717,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
714 outfile_path, 717 outfile_path,
715 "mysqldump_generic_stats", 718 "mysqldump_generic_stats",
716 getpid()); 719 getpid());
717 720 GNUNET_free(fn);
718 fn = GNUNET_STRINGS_filename_expand (outfile_name); 721 fn = GNUNET_STRINGS_filename_expand (outfile_name);
719 722
720 if (fn == NULL) 723 if (fn == NULL)
@@ -746,7 +749,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
746 outfile_path, 749 outfile_path,
747 "mysqldump_dhtkey", 750 "mysqldump_dhtkey",
748 getpid()); 751 getpid());
749 752 GNUNET_free(fn);
750 fn = GNUNET_STRINGS_filename_expand (outfile_name); 753 fn = GNUNET_STRINGS_filename_expand (outfile_name);
751 754
752 if (fn == NULL) 755 if (fn == NULL)
@@ -778,7 +781,7 @@ libgnunet_plugin_dhtlog_mysql_dump_load_init (void * cls)
778 outfile_path, 781 outfile_path,
779 "mysqldump_extended_topology", 782 "mysqldump_extended_topology",
780 getpid()); 783 getpid());
781 784 GNUNET_free(fn);
782 fn = GNUNET_STRINGS_filename_expand (outfile_name); 785 fn = GNUNET_STRINGS_filename_expand (outfile_name);
783 786
784 if (fn == NULL) 787 if (fn == NULL)