- Added explicit cast, just in case
authorBart Polot <bart@net.in.tum.de>
Thu, 24 Nov 2011 16:25:55 +0000 (16:25 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 24 Nov 2011 16:25:55 +0000 (16:25 +0000)
src/nse/gnunet-service-nse.c

index 861be591407fc848a0dea9ab89cff82504ff5c00..33ec51f03fa9a786a1f944e5293e498fd1f1c1bf 100644 (file)
@@ -439,7 +439,7 @@ get_delay_randomization (uint32_t matching_bits)
   if (matching_bits == 0)
     return GNUNET_TIME_UNIT_ZERO;
   d = get_matching_bits_delay (matching_bits - 1);
-  i = d / (double) (hop_count_max + 1);
+  i = (uint32_t) (d / (double) (hop_count_max + 1));
   ret.rel_value = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, i + 1);
   return ret;
 #else