From 4edb9e15b43485010d0a8c8eeb48ef2ab48ba372 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 21 Oct 2010 09:12:44 +0000 Subject: [PATCH] redeclaration of converge_modifier inside function makes global useless --- src/dht/gnunet-service-dht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 1de501682..220763529 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -2879,14 +2879,13 @@ am_closest_peer (const GNUNET_HashCode * target, struct GNUNET_CONTAINER_BloomFi * adjusted based on the current routing convergence algorithm * */ -unsigned long long +static unsigned long long converge_distance (const GNUNET_HashCode *target, struct PeerInfo *peer, unsigned int hops) { unsigned long long ret; unsigned int other_matching_bits; - double converge_modifier = 0.0; double base_converge_modifier = .1; double calc_value; double exponent; @@ -2938,7 +2937,7 @@ converge_distance (const GNUNET_HashCode *target, /* Take the log (base e) of the number of bits matching the other peer */ exponent = log(other_matching_bits); - /* Check if we would overflow; our largest possible value is 2^64 = e^44.361419555836498 */ + /* Check if we would overflow; our largest possible value is 2^64 approx. e^44.361419555836498 */ if (exponent * calc_value >= 44.361419555836498) return ULLONG_MAX; -- 2.25.1