aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-12-21 13:01:56 +0000
committerNathan S. Evans <evans@in.tum.de>2010-12-21 13:01:56 +0000
commit5b3d8f303f956448458ebe2d22f7cc48604956ca (patch)
treef2645622a4f2eca3bdd4837df6bedc66120833e2 /src/dht/gnunet-service-dht.c
parent5ef7306d3d74c3e076407880ea28fa46fff98b4f (diff)
downloadgnunet-5b3d8f303f956448458ebe2d22f7cc48604956ca.tar.gz
gnunet-5b3d8f303f956448458ebe2d22f7cc48604956ca.zip
remove impossible condition check
Diffstat (limited to 'src/dht/gnunet-service-dht.c')
-rw-r--r--src/dht/gnunet-service-dht.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 4b5073880..a621e8e82 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -3293,7 +3293,7 @@ select_peer (const GNUNET_HashCode * target,
3293 &sorted_closest[i]->id. 3293 &sorted_closest[i]->id.
3294 hashPubKey)) 3294 hashPubKey))
3295 break; /* Ignore bloomfiltered peers */ 3295 break; /* Ignore bloomfiltered peers */
3296 if ((temp_converge_distance <= ULLONG_MAX) && (total_distance + temp_converge_distance > total_distance)) /* Handle largest case and overflow */ 3296 if (total_distance + temp_converge_distance > total_distance) /* Handle largest case and overflow */
3297 total_distance += temp_converge_distance; 3297 total_distance += temp_converge_distance;
3298 else 3298 else
3299 break; /* overflow case */ 3299 break; /* overflow case */
@@ -3314,7 +3314,7 @@ select_peer (const GNUNET_HashCode * target,
3314 continue; /* Ignore bloomfiltered peers */ 3314 continue; /* Ignore bloomfiltered peers */
3315 } 3315 }
3316 temp_converge_distance = converge_distance (target, pos, hops); 3316 temp_converge_distance = converge_distance (target, pos, hops);
3317 if ((temp_converge_distance <= ULLONG_MAX) && (total_distance + temp_converge_distance > total_distance)) /* Handle largest case and overflow */ 3317 if (total_distance + temp_converge_distance > total_distance) /* Handle largest case and overflow */
3318 total_distance += temp_converge_distance; 3318 total_distance += temp_converge_distance;
3319 else 3319 else
3320 break; /* overflow case */ 3320 break; /* overflow case */
@@ -3367,7 +3367,7 @@ select_peer (const GNUNET_HashCode * target,
3367 break; /* Ignore bloomfiltered peers */ 3367 break; /* Ignore bloomfiltered peers */
3368 temp_converge_distance = 3368 temp_converge_distance =
3369 converge_distance (target, sorted_closest[i], hops); 3369 converge_distance (target, sorted_closest[i], hops);
3370 if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance + temp_converge_distance > stats_total_distance)) /* Handle largest case and overflow */ 3370 if (stats_total_distance + temp_converge_distance > stats_total_distance) /* Handle largest case and overflow */
3371 stats_total_distance += temp_converge_distance; 3371 stats_total_distance += temp_converge_distance;
3372 else 3372 else
3373 break; /* overflow case */ 3373 break; /* overflow case */
@@ -3397,7 +3397,7 @@ select_peer (const GNUNET_HashCode * target,
3397 continue; /* Ignore bloomfiltered peers */ 3397 continue; /* Ignore bloomfiltered peers */
3398 } 3398 }
3399 temp_converge_distance = converge_distance (target, pos, hops); 3399 temp_converge_distance = converge_distance (target, pos, hops);
3400 if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance + temp_converge_distance > stats_total_distance)) /* Handle largest case and overflow */ 3400 if (stats_total_distance + temp_converge_distance > stats_total_distance) /* Handle largest case and overflow */
3401 stats_total_distance += temp_converge_distance; 3401 stats_total_distance += temp_converge_distance;
3402 else 3402 else
3403 break; /* overflow case */ 3403 break; /* overflow case */
@@ -3430,7 +3430,7 @@ select_peer (const GNUNET_HashCode * target,
3430 continue; /* Ignore bloomfiltered peers */ 3430 continue; /* Ignore bloomfiltered peers */
3431 } 3431 }
3432 temp_converge_distance = converge_distance (target, pos, hops); 3432 temp_converge_distance = converge_distance (target, pos, hops);
3433 if ((temp_converge_distance <= ULLONG_MAX) && (stats_total_distance + temp_converge_distance > stats_total_distance)) /* Handle largest case and overflow */ 3433 if (stats_total_distance + temp_converge_distance > stats_total_distance) /* Handle largest case and overflow */
3434 stats_total_distance += temp_converge_distance; 3434 stats_total_distance += temp_converge_distance;
3435 else 3435 else
3436 break; /* overflow case */ 3436 break; /* overflow case */