gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13338 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r13338 - gnunet/src/dht
Date: Thu, 21 Oct 2010 11:12:44 +0200

Author: nevans
Date: 2010-10-21 11:12:44 +0200 (Thu, 21 Oct 2010)
New Revision: 13338

Modified:
   gnunet/src/dht/gnunet-service-dht.c
Log:
redeclaration of converge_modifier inside function makes global useless

Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-10-21 08:54:24 UTC (rev 13337)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-10-21 09:12:44 UTC (rev 13338)
@@ -2879,14 +2879,13 @@
  *         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 @@
   /* 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;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]