From: Nathan S. Evans Date: Thu, 21 Oct 2010 09:12:44 +0000 (+0000) Subject: redeclaration of converge_modifier inside function makes global useless X-Git-Tag: initial-import-from-subversion-38251~20005 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4edb9e15b43485010d0a8c8eeb48ef2ab48ba372;p=oweals%2Fgnunet.git redeclaration of converge_modifier inside function makes global useless --- 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;