Explorar o código

Fix a division by zero.

With --enable-slow-machine, we often divide variables by a large number. We should make sure the result is larger than 0.
Cyril Roelandt %!s(int64=13) %!d(string=hai) anos
pai
achega
a0b69c2602
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      tests/datawizard/reclaim.c

+ 2 - 0
tests/datawizard/reclaim.c

@@ -88,6 +88,8 @@ int main(int argc, char **argv)
 
 #ifdef STARPU_SLOW_MACHINE
 	mb /= 100;
+	if (mb == 0)
+		mb = 1;
 	ntasks /= 100;
 #endif