* winsup.api/pthread/rwlock7.c (main): Don't assume that result of rand

operation is non-zero.
This commit is contained in:
Christopher Faylor 2003-12-24 04:37:19 +00:00
parent 05b2a10ba4
commit 1f32b7b382
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-12-23 Christopher Faylor <cgf@redhat.com>
* winsup.api/pthread/rwlock7.c (main): Don't assume that result of rand
operation is non-zero.
2003-12-01 Corinna Vinschen <corinna@vinschen.de>
* winsup.api/known_bugs.tcl: Remove fcntl09 and fcntl10. These

View File

@ -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);