]> mj.ucw.cz Git - libucw.git/blobdiff - lib/random.c
First bits of the sorter infrastructure.
[libucw.git] / lib / random.c
index 87f7f544b5e95f47918e486610679c91a3a58c22..211986b722d00ae7bc41f7bf9a73e3935f152302 100644 (file)
@@ -19,6 +19,7 @@ random_max(uns max)
 {
   uns r, l;
 
+  ASSERT(max <= (1 << 30));
   l = (RAND_MAX + 1U) - ((RAND_MAX + 1U) % max);
   do
     r = random();