debuggers.hg

changeset 20872:b0b41e735575

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 20 09:51:38 2010 +0000 (2010-01-20)
parents 49a2c1069e14
children fad80160c001
files tools/python/xen/lowlevel/xc/xc.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Wed Jan 20 09:33:59 2010 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Wed Jan 20 09:51:38 2010 +0000
     1.3 @@ -933,7 +933,7 @@ static PyObject *pyxc_hvm_build(XcObject
     1.4          if ( PyInt_Check(vcpu_avail_handle) )
     1.5          {
     1.6              unsigned long v = PyInt_AsLong(vcpu_avail_handle);
     1.7 -            for ( i = 0; i < sizeof(long)/8; i++ )
     1.8 +            for ( i = 0; i < sizeof(long); i++ )
     1.9                  vcpu_avail[i] = (uint8_t)(v>>(i*8));
    1.10          }
    1.11          else if ( PyLong_Check(vcpu_avail_handle) )