From 9a7cfea9e5f6a8289e802dc6d39be521760bc525 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 29 Jan 2007 03:18:59 +0000 Subject: fixup shadowed warnings --- test/pthread/ex7.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/pthread/ex7.c') diff --git a/test/pthread/ex7.c b/test/pthread/ex7.c index 93fc34a8c..9cf30aa19 100644 --- a/test/pthread/ex7.c +++ b/test/pthread/ex7.c @@ -27,7 +27,7 @@ test_thread (void *ms_param) { unsigned long status = 0; event_t foo; - struct timespec time; + struct timespec timeout; struct timeval now; long ms = (long) ms_param; @@ -39,13 +39,13 @@ test_thread (void *ms_param) /* set the time out value */ printf("waiting %ld ms ...\n", ms); gettimeofday(&now, NULL); - time.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000; - time.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000; + timeout.tv_sec = now.tv_sec + ms/1000 + (now.tv_usec + (ms%1000)*1000)/1000000; + timeout.tv_nsec = ((now.tv_usec + (ms%1000)*1000) % 1000000) * 1000; /* Just use this to test the time out. The cond var is never signaled. */ pthread_mutex_lock(&foo.mutex); while (foo.flag == 0 && status != ETIMEDOUT) { - status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &time); + status = pthread_cond_timedwait(&foo.cond, &foo.mutex, &timeout); } pthread_mutex_unlock(&foo.mutex); -- cgit v1.2.3