From 9268b9ad48990757ce12e03831e2148a963ff0aa Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 12 Feb 2016 06:49:50 +0100 Subject: [PATCH] util: Use virBitmapIsBitSet in freebsd impl of virProcessSetAffinity 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 c7ffa42066..bf6a6df8a6 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.47.2