--- libxslt-1.1.26/xsltproc/testThreads.c	2009-08-14 11:14:22 +0400
+++ libxslt/xsltproc/testThreads.c	2011-09-25 11:49:35 +0400
@@ -198,10 +198,8 @@
      */
     printf("Pass 1\n");
     for (repeat = 0;repeat < 500;repeat++) {
-	for (i = 0; i < num_threads; i++) {
-	    results[i] = NULL;
-	    tid[i] = (pthread_t) -1;
-	}
+        memset(results, 0, sizeof(*results)*num_threads);
+        memset(tid, 0xff, sizeof(*tid)*num_threads);
 
 	for (i = 0; i < num_threads; i++) {
 	    ret = pthread_create(&tid[i], NULL, threadRoutine1,
@@ -240,10 +238,8 @@
             fprintf(stderr, "Main failed to compile stylesheet\n");
             exit(1);
         }
-	for (i = 0; i < num_threads; i++) {
-	    results[i] = NULL;
-	    tid[i] = (pthread_t) -1;
-	}
+        memset(results, 0, sizeof(*results)*num_threads);
+        memset(tid, 0xff, sizeof(*tid)*num_threads);
 
 	for (i = 0; i < num_threads; i++) {
 	    ret = pthread_create(&tid[i], NULL, threadRoutine2, (void *) cur);
