From 1f32b7b382a5a7600874b5d582220984afd460b6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 24 Dec 2003 04:37:19 +0000 Subject: * winsup.api/pthread/rwlock7.c (main): Don't assume that result of rand operation is non-zero. --- winsup/testsuite/winsup.api/pthread/rwlock7.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/testsuite/winsup.api/pthread') diff --git a/winsup/testsuite/winsup.api/pthread/rwlock7.c b/winsup/testsuite/winsup.api/pthread/rwlock7.c index 5b0727d99..ded882d9f 100644 --- a/winsup/testsuite/winsup.api/pthread/rwlock7.c +++ b/winsup/testsuite/winsup.api/pthread/rwlock7.c @@ -141,7 +141,8 @@ main (int argc, char *argv[]) threads[count].thread_num = count; threads[count].updates = 0; threads[count].reads = 0; - threads[count].interval = rand_r (&seed) % 71; + while (!(threads[count].interval = rand_r (&seed) % 71)) + continue; assert(pthread_create (&threads[count].thread_id, NULL, thread_routine, (void*)&threads[count]) == 0); -- cgit v1.2.3