mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
util: Use virBitmapIsBitSet in freebsd impl of virProcessSetAffinity
Use the helper that does not return errors to fix spuriously looking dead return of -1.
This commit is contained in:
parent
a7bc9841a4
commit
9268b9ad48
@ -535,13 +535,10 @@ int virProcessSetAffinity(pid_t pid,
|
||||
{
|
||||
size_t i;
|
||||
cpuset_t mask;
|
||||
bool set = false;
|
||||
|
||||
CPU_ZERO(&mask);
|
||||
for (i = 0; i < virBitmapSize(map); i++) {
|
||||
if (virBitmapGetBit(map, i, &set) < 0)
|
||||
return -1;
|
||||
if (set)
|
||||
if (virBitmapIsBitSet(map, i))
|
||||
CPU_SET(i, &mask);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user