Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 2004 05:31:15 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 65536 for review
Message-ID:  <200411200531.iAK5VFoU014532@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65536

Change 65536 by davidxu@davidxu_alona on 2004/11/20 05:30:15

	Check NULL thread pointer.

Affected files ...

.. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_seterrno.c#2 edit

Differences ...

==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_seterrno.c#2 (text+ko) ====

@@ -38,16 +38,14 @@
  * This function needs to reference the global error variable which is
  * normally hidden from the user. 
  */
-#ifdef errno
-#undef errno;
-#endif
+#undef errno
 extern int      errno;
 
 void
 _thread_seterrno(pthread_t thread, int error)
 {
 	/* Check for the initial thread: */
-	if (thread == _thr_initial)
+	if (thread == NULL || thread == _thr_initial)
 		/* The initial thread always uses the global error variable: */
 		errno = error;
 	else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411200531.iAK5VFoU014532>