[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH go v2] domain.go: wrong calculation of bitmask in PinVcpuFlags()



---
 domain.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/domain.go b/domain.go
index 2bd9852..7276ef8 100644
--- a/domain.go
+++ b/domain.go
@@ -1768,7 +1768,7 @@ func (d *Domain) PinVcpuFlags(vcpu uint, cpuMap []bool, flags DomainModification
 	ccpumap := make([]C.uchar, maplen)
 	for i := 0; i < len(cpuMap); i++ {
 		if cpuMap[i] {
-			byte := (i + 7) / 8
+			byte := i / 8
 			bit := i % 8
 			ccpumap[byte] |= (1 << uint(bit))
 		}
-- 
2.11.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]