debuggers.hg

changeset 21230:22339e54f0bb

xend: Fix numainfo/topologyinfo loop iterators in Xc extension.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Apr 15 12:29:48 2010 +0100 (2010-04-15)
parents b90f92d0f06b
children fddff17c7c74
files tools/python/xen/lowlevel/xc/xc.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Thu Apr 15 12:28:33 2010 +0100
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Thu Apr 15 12:29:48 2010 +0100
     1.3 @@ -1215,7 +1215,7 @@ static PyObject *pyxc_topologyinfo(XcObj
     1.4      cpu_to_core_obj = PyList_New(0);
     1.5      cpu_to_socket_obj = PyList_New(0);
     1.6      cpu_to_node_obj = PyList_New(0);
     1.7 -    for ( i = 0; i < max_cpu_index; i++ )
     1.8 +    for ( i = 0; i <= max_cpu_index; i++ )
     1.9      {
    1.10          if ( coremap[i] == INVALID_TOPOLOGY_ID )
    1.11          {
    1.12 @@ -1296,7 +1296,7 @@ static PyObject *pyxc_numainfo(XcObject 
    1.13      node_to_memfree_obj = PyList_New(0);
    1.14      node_to_dma32_mem_obj = PyList_New(0);
    1.15      node_to_node_dist_list_obj = PyList_New(0);
    1.16 -    for ( i = 0; i < max_node_index; i++ )
    1.17 +    for ( i = 0; i <= max_node_index; i++ )
    1.18      {
    1.19          PyObject *pyint;
    1.20  
    1.21 @@ -1318,7 +1318,7 @@ static PyObject *pyxc_numainfo(XcObject 
    1.22  
    1.23          /* Node to Node Distance */
    1.24          node_to_node_dist_obj = PyList_New(0);
    1.25 -        for ( j = 0; j < ninfo.max_node_index; j++ )
    1.26 +        for ( j = 0; j <= max_node_index; j++ )
    1.27          {
    1.28              uint32_t dist = nodes_dist[i*(max_node_index+1) + j];
    1.29              if ( dist == INVALID_TOPOLOGY_ID )