Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ensure that I don't 'fix' it by accident in the future
[simgrid.git] / teshsuite / simdag / evaluate-get-route-time / evaluate-get-route-time.c
index ff86f3a..6ce4fd9 100644 (file)
@@ -32,7 +32,7 @@ int main(int argc, char **argv)
   xbt_assert(host_count > 1);
   i = rand() % host_count;
   j = rand() % (host_count - 1);
-  if (j >= i)
+  if (j >= i) // '>=' is not a bug: j is uniform on host_count-1 values, and shifted on need to maintain uniform random
     j++;
 
   const_sg_host_t h1 = hosts[i];