mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Fix 20825:49a2c1069e14
Converting an Python Int, sizeof(long) already returns byte length rather than bit length so do not divide-by-8. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
2e883df395
commit
9e5e0eb840
1 file changed
+1
-1
@@ -933,7 +933,7 @@ static PyObject *pyxc_hvm_build(XcObject *self,
|
||||
if ( PyInt_Check(vcpu_avail_handle) )
|
||||
{
|
||||
unsigned long v = PyInt_AsLong(vcpu_avail_handle);
|
||||
for ( i = 0; i < sizeof(long)/8; i++ )
|
||||
for ( i = 0; i < sizeof(long); i++ )
|
||||
vcpu_avail[i] = (uint8_t)(v>>(i*8));
|
||||
}
|
||||
else if ( PyLong_Check(vcpu_avail_handle) )
|
||||
|
||||