[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13958 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13958 - gnunet/src/dht |
Date: |
Tue, 21 Dec 2010 14:01:56 +0100 |
Author: nevans
Date: 2010-12-21 14:01:56 +0100 (Tue, 21 Dec 2010)
New Revision: 13958
Modified:
gnunet/src/dht/gnunet-service-dht.c
Log:
remove impossible condition check
Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-12-21 12:52:44 UTC (rev 13957)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-12-21 13:01:56 UTC (rev 13958)
@@ -3293,7 +3293,7 @@
&sorted_closest[i]->id.
hashPubKey))
break; /* Ignore bloomfiltered peers */
- if ((temp_converge_distance <= ULLONG_MAX) && (total_distance +
temp_converge_distance > total_distance)) /* Handle largest case and overflow */
+ if (total_distance + temp_converge_distance > total_distance) /* Handle
largest case and overflow */
total_distance += temp_converge_distance;
else
break; /* overflow case */
@@ -3314,7 +3314,7 @@
continue; /* Ignore bloomfiltered peers */
}
temp_converge_distance = converge_distance (target, pos, hops);
- if ((temp_converge_distance <= ULLONG_MAX) && (total_distance +
temp_converge_distance > total_distance)) /* Handle largest case and
overflow */
+ if (total_distance + temp_converge_distance > total_distance) /*
Handle largest case and overflow */
total_distance += temp_converge_distance;
else
break; /* overflow case */
@@ -3367,7 +3367,7 @@
break; /* Ignore bloomfiltered peers */
temp_converge_distance =
converge_distance (target, sorted_closest[i], hops);
- if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance +
temp_converge_distance > stats_total_distance)) /* Handle largest case and
overflow */
+ if (stats_total_distance + temp_converge_distance >
stats_total_distance) /* Handle largest case and overflow */
stats_total_distance += temp_converge_distance;
else
break; /* overflow case */
@@ -3397,7 +3397,7 @@
continue; /* Ignore bloomfiltered peers */
}
temp_converge_distance = converge_distance (target, pos, hops);
- if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance
+ temp_converge_distance > stats_total_distance)) /* Handle largest case and
overflow */
+ if (stats_total_distance + temp_converge_distance >
stats_total_distance) /* Handle largest case and overflow */
stats_total_distance += temp_converge_distance;
else
break; /* overflow case */
@@ -3430,7 +3430,7 @@
continue; /* Ignore bloomfiltered peers */
}
temp_converge_distance = converge_distance (target, pos, hops);
- if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance
+ temp_converge_distance > stats_total_distance)) /* Handle largest case and
overflow */
+ if (stats_total_distance + temp_converge_distance >
stats_total_distance) /* Handle largest case and overflow */
stats_total_distance += temp_converge_distance;
else
break; /* overflow case */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13958 - gnunet/src/dht,
gnunet <=