aboutsummaryrefslogtreecommitdiff
path: root/pthreads/tests/cleanup0.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthreads/tests/cleanup0.c')
-rw-r--r--pthreads/tests/cleanup0.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/pthreads/tests/cleanup0.c b/pthreads/tests/cleanup0.c
index d9fbedccc..888640b7f 100644
--- a/pthreads/tests/cleanup0.c
+++ b/pthreads/tests/cleanup0.c
@@ -6,10 +6,11 @@
*
* Pthreads-win32 - POSIX Threads Library for Win32
* Copyright(C) 1998 John E. Bossom
- * Copyright(C) 1999,2005 Pthreads-win32 contributors
- *
- * Contact Email: rpj@callisto.canberra.edu.au
- *
+ * Copyright(C) 1999,2012 Pthreads-win32 contributors
+ *
+ * Homepage1: http://sourceware.org/pthreads-win32/
+ * Homepage2: http://sourceforge.net/projects/pthreads4w/
+ *
* The current list of contributors is contained
* in the file CONTRIBUTORS included with the source
* code distribution. The list can also be seen at the
@@ -97,7 +98,7 @@ typedef struct {
CRITICAL_SECTION cs;
} sharedInt_t;
-static sharedInt_t pop_count = {0, {0}};
+static sharedInt_t pop_count;
static void
increment_pop_count(void * arg)
@@ -147,6 +148,8 @@ main()
int i;
pthread_t t[NUMTHREADS + 1];
+ memset(&pop_count, 0, sizeof(sharedInt_t));
+
InitializeCriticalSection(&pop_count.cs);
assert((t[0] = pthread_self()).p != NULL);
@@ -159,7 +162,7 @@ main()
}
/*
- * Code to control or munipulate child threads should probably go here.
+ * Code to control or manipulate child threads should probably go here.
*/
Sleep(500);
@@ -193,7 +196,7 @@ main()
assert(pthread_join(t[i], &result) == 0);
- fail = ((int)(size_t)result == (int) PTHREAD_CANCELED);
+ fail = (result == PTHREAD_CANCELED);
if (fail)
{