summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/queues/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/queues/queue.c')
-rw-r--r--misc/examples/queues/queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/queues/queue.c b/misc/examples/queues/queue.c
index 56b5beb9..913524cc 100644
--- a/misc/examples/queues/queue.c
+++ b/misc/examples/queues/queue.c
@@ -7,20 +7,20 @@
int main(void) {
int n = 100000000;
- crand_unif_t dist;
+ crand_uniform_t dist;
crand_t rng = crand_init(1234);
- dist = crand_unif_init(0, n);
+ dist = crand_uniform_init(0, n);
cqueue_i queue = {0};
// Push ten million random numbers onto the queue.
c_forrange (n)
- cqueue_i_push(&queue, (int)crand_unif(&rng, &dist));
+ cqueue_i_push(&queue, (int)crand_uniform(&rng, &dist));
// Push or pop on the queue ten million times
printf("%d\n", n);
c_forrange (n) { // forrange uses initial n only.
- int r = (int)crand_unif(&rng, &dist);
+ int r = (int)crand_uniform(&rng, &dist);
if (r & 1)
++n, cqueue_i_push(&queue, r);
else