diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-01-20 09:51:38 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-01-20 09:51:38 +0000 |
commit | 9e5e0eb8408c37b42411c6686c36eccd2426e7fd (patch) | |
tree | 4fb6002c021e802f827b1caa1216429494f4ec04 | |
parent | 2e883df3953dc1cdfb3efa584274c22bcc65f4f6 (diff) | |
download | xen-9e5e0eb8408c37b42411c6686c36eccd2426e7fd.tar.gz xen-9e5e0eb8408c37b42411c6686c36eccd2426e7fd.tar.bz2 xen-9e5e0eb8408c37b42411c6686c36eccd2426e7fd.zip |
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>
-rw-r--r-- | tools/python/xen/lowlevel/xc/xc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 996e1b4ae2..1932758090 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -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) ) |