From af14ddd18a8e745cb99ce00f9d2ccef46e81c113 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 30 Sep 2011 07:46:32 +0000 Subject: [PATCH] added assertion to find https://www.gnunet.org/bugs/view.php?id=1808 --- src/dht/gnunet-service-dht_neighbours.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index e5f9d0d23..8a0e7943c 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c @@ -503,7 +503,10 @@ update_core_preference (void *cls, if (bucket == GNUNET_SYSERR) preference = 0; else + { + GNUNET_assert (k_buckets[bucket].peers_size != 0); preference = (1LL << matching) / k_buckets[bucket].peers_size; + } if (preference == 0) { peer->preference_task -- 2.25.1