]> git.meshlink.io Git - catta/commitdiff
use rand() because random() isn't available on windows
authorSven M. Hallberg <pesco@khjk.org>
Mon, 1 Sep 2014 22:45:28 +0000 (00:45 +0200)
committerSven M. Hallberg <pesco@khjk.org>
Mon, 1 Sep 2014 22:45:28 +0000 (00:45 +0200)
tests/prioq-test.c

index b01068cf9a192b4d7c684a0b42052b6d58f0f2ac..d9f9f19546dcc85a152df0cb56b175ec8a40b5f8 100644 (file)
@@ -90,7 +90,7 @@ int main(CATTA_GCC_UNUSED int argc, CATTA_GCC_UNUSED char *argv[]) {
     srand(time(NULL));
 
     for (i = 0; i < 10000; i++)
-        catta_prio_queue_put(q2, catta_prio_queue_put(q, INT_TO_POINTER(random() & 0xFFFF)));
+        catta_prio_queue_put(q2, catta_prio_queue_put(q, INT_TO_POINTER(rand() & 0xFFFF)));
 
     while (q2->root) {
         rec(q->root);