diff options
| author | tv <tv@NetBSD.org> | 2005-09-21 15:27:14 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 2005-09-21 15:27:14 +0000 |
| commit | 21eb6bbacb0a14caa82f9bf026e437452cbbab74 (patch) | |
| tree | 0e5a76eb60d82dc6c29c7f5de75fd1245c046903 /lib/libpthread | |
| parent | 3cc3e3c7a37e8eda2fb60d694d1ec44ea4ffbb22 (diff) | |
pthread_attr_getschedpolicy() wasn't setting the return buffer at all.
SCHED_OTHER happens to be 0, so this assignment to "int *" succeeds,
and becomes a no-op.
Fix by dereferencing "policy" to do the assignment, thus filling the
return buffer with 0.
Diffstat (limited to 'lib/libpthread')
| -rw-r--r-- | lib/libpthread/pthread_attr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/pthread_attr.c b/lib/libpthread/pthread_attr.c index 730b5d561bd..6237807318b 100644 --- a/lib/libpthread/pthread_attr.c +++ b/lib/libpthread/pthread_attr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_attr.c,v 1.4 2004/12/29 00:59:57 nathanw Exp $ */ +/* $NetBSD: pthread_attr.c,v 1.5 2005/09/21 15:27:14 tv Exp $ */ /*- * Copyright (c) 2001,2002,2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread_attr.c,v 1.4 2004/12/29 00:59:57 nathanw Exp $"); +__RCSID("$NetBSD: pthread_attr.c,v 1.5 2005/09/21 15:27:14 tv Exp $"); #include <errno.h> #include <stdio.h> @@ -286,7 +286,7 @@ pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) { - policy = SCHED_OTHER; + *policy = SCHED_OTHER; return 0; } |
