diff options
| author | 1999-05-12 06:00:00 +0000 | |
|---|---|---|
| committer | 1999-05-12 06:00:00 +0000 | |
| commit | 6f630324beea8af747018be42cec4b882c7bf561 (patch) | |
| tree | 1372694559e22ff0376fdbd68b59041691c66623 /lib/libpthread | |
| parent | clean up (diff) | |
| download | wireguard-openbsd-6f630324beea8af747018be42cec4b882c7bf561.tar.xz wireguard-openbsd-6f630324beea8af747018be42cec4b882c7bf561.zip | |
permit NULL result parameter for pthread_create(). Apparently used in Stevens?
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/uthread/uthread_create.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_create.c b/lib/libpthread/uthread/uthread_create.c index d4542c6624b..eede7c6b5e9 100644 --- a/lib/libpthread/uthread/uthread_create.c +++ b/lib/libpthread/uthread/uthread_create.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: uthread_create.c,v 1.8 1999/03/10 10:06:22 d Exp $ + * $OpenBSD: uthread_create.c,v 1.9 1999/05/12 06:00:00 d Exp $ */ #include <errno.h> #include <stdlib.h> @@ -174,7 +174,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, _unlock_thread_list(); /* Return a pointer to the thread structure: */ - (*thread) = new_thread; + if (thread != NULL) + (*thread) = new_thread; /* Schedule the new user thread: */ _thread_kern_sched(NULL); |
