Use the helper that does not return errors to fix spuriously looking
dead return of -1.
---
src/util/virprocess.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index c7ffa42..bf6a6df 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -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);
}
--
2.6.2