remove impossible condition check
authorNathan S. Evans <evans@in.tum.de>
Tue, 21 Dec 2010 13:01:56 +0000 (13:01 +0000)
committerNathan S. Evans <evans@in.tum.de>
Tue, 21 Dec 2010 13:01:56 +0000 (13:01 +0000)
src/dht/gnunet-service-dht.c

index 4b50738802686fbcfe5fd20bfdb073bbac016152..a621e8e82d87214c468111638388d1017c2b865d 100644 (file)
@@ -3293,7 +3293,7 @@ select_peer (const GNUNET_HashCode * target,
                                              &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 @@ select_peer (const GNUNET_HashCode * target,
               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 @@ select_peer (const GNUNET_HashCode * target,
         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 @@ select_peer (const GNUNET_HashCode * target,
               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 @@ select_peer (const GNUNET_HashCode * target,
               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 */