libthr: Trim trailing whitespaces in pthread_attr_affinity.
MFC after: 1 week
This commit is contained in:
parent
2b87addf52
commit
f8660ea4b1
@ -629,7 +629,7 @@ _pthread_attr_setaffinity_np(pthread_attr_t *pattr, size_t cpusetsize,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
size_t kern_size = _get_kern_cpuset_size();
|
size_t kern_size = _get_kern_cpuset_size();
|
||||||
/* Kernel rejects small set, we check it here too. */
|
/* Kernel rejects small set, we check it here too. */
|
||||||
if (cpusetsize < kern_size)
|
if (cpusetsize < kern_size)
|
||||||
return (ERANGE);
|
return (ERANGE);
|
||||||
if (cpusetsize > kern_size) {
|
if (cpusetsize > kern_size) {
|
||||||
@ -663,7 +663,7 @@ _pthread_attr_getaffinity_np(const pthread_attr_t *pattr, size_t cpusetsize,
|
|||||||
if (pattr == NULL || (attr = (*pattr)) == NULL)
|
if (pattr == NULL || (attr = (*pattr)) == NULL)
|
||||||
ret = EINVAL;
|
ret = EINVAL;
|
||||||
else {
|
else {
|
||||||
/* Kernel rejects small set, we check it here too. */
|
/* Kernel rejects small set, we check it here too. */
|
||||||
size_t kern_size = _get_kern_cpuset_size();
|
size_t kern_size = _get_kern_cpuset_size();
|
||||||
if (cpusetsize < kern_size)
|
if (cpusetsize < kern_size)
|
||||||
return (ERANGE);
|
return (ERANGE);
|
||||||
@ -673,7 +673,7 @@ _pthread_attr_getaffinity_np(const pthread_attr_t *pattr, size_t cpusetsize,
|
|||||||
else
|
else
|
||||||
memset(cpusetp, -1, kern_size);
|
memset(cpusetp, -1, kern_size);
|
||||||
if (cpusetsize > kern_size)
|
if (cpusetsize > kern_size)
|
||||||
memset(((char *)cpusetp) + kern_size, 0,
|
memset(((char *)cpusetp) + kern_size, 0,
|
||||||
cpusetsize - kern_size);
|
cpusetsize - kern_size);
|
||||||
}
|
}
|
||||||
return (ret);
|
return (ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user