From: Peter Krempa Date: Fri, 12 Feb 2016 05:49:50 +0000 (+0100) Subject: util: Use virBitmapIsBitSet in freebsd impl of virProcessSetAffinity X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9268b9ad48990757ce12e03831e2148a963ff0aa;p=libvirt.git util: Use virBitmapIsBitSet in freebsd impl of virProcessSetAffinity Use the helper that does not return errors to fix spuriously looking dead return of -1. --- 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); }