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

[Xen-changelog] [xen-unstable] xend: Fix 20825:49a2c1069e14



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1263981098 0
# Node ID b0b41e735575ec6fc1d7d56f3cffa9246058881a
# Parent  49a2c1069e140fb7f3f1a1c559fadeb0fd9b8af8
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@xxxxxxxxxx>
---
 tools/python/xen/lowlevel/xc/xc.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 49a2c1069e14 -r b0b41e735575 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Jan 20 09:33:59 2010 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Jan 20 09:51:38 2010 +0000
@@ -933,7 +933,7 @@ static PyObject *pyxc_hvm_build(XcObject
         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) )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.