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:
Peter Krempa 2016-02-12 06:49:50 +01:00
parent a7bc9841a4
commit 9268b9ad48

View File

@ -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);
}