diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-03-06 03:24:03 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-03-06 03:24:03 +0000 |
commit | cd00bbaa4bcc5be9adaa09d8f503eee4cf3a4cee (patch) | |
tree | 59cd6518a040bd162057c6afec296bdbf9719022 /lib/libthr | |
parent | 9ca2b049f6fcc9471c0b3e0fc810a5a1af4819a1 (diff) | |
download | FreeBSD-src-cd00bbaa4bcc5be9adaa09d8f503eee4cf3a4cee.zip FreeBSD-src-cd00bbaa4bcc5be9adaa09d8f503eee4cf3a4cee.tar.gz |
Fix a bug when calculating remnant size.
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/thread/thr_attr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index cd13553..dafdf15 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -602,7 +602,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize, attr->cpusetsize = cpusetsize; } else { memset(((char *)attr->cpuset) + cpusetsize, 0, - cpusetsize - attr->cpusetsize); + attr->cpusetsize - cpusetsize); attr->cpusetsize = cpusetsize; } memcpy(attr->cpuset, cpuset, cpusetsize); |