[ofa-general] Re: [PATCH v2] opensm/osm_ucast_ftree.c Fixed bad init value for down port index
Sasha Khapyorsky
sashak at voltaire.com
Wed Feb 11 06:04:13 PST 2009
On 10:53 Tue 10 Feb , Nicolas Morey Chaisemartin wrote:
> Fixes the init value of down_port_groups_idx to 0 so it's in the port group
> interval.
> This way __osm_ftree_fabric_route_upgoing_by_going_down can use the index
> directly without segfaulting.
>
> Signed-off-by: Nicolas Morey-Chaisemartin
> <nicolas.morey-chaisemartin at ext.bull.net>
Applied. Thanks.
> ---
> opensm/opensm/osm_ucast_ftree.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/opensm/opensm/osm_ucast_ftree.c
> b/opensm/opensm/osm_ucast_ftree.c
> index 4e65c87..eae1ed8 100644
> --- a/opensm/opensm/osm_ucast_ftree.c
> +++ b/opensm/opensm/osm_ucast_ftree.c
> @@ -563,7 +563,7 @@ static ftree_sw_t *__osm_ftree_sw_create(IN
> ftree_fabric_t * p_ftree,
> /* initialize lft buffer */
> memset(p_osm_sw->new_lft, OSM_NO_PATH, IB_LID_UCAST_END_HO + 1);
>
> - p_sw->down_port_groups_idx = -1;
> + p_sw->down_port_groups_idx = 0;
I make it 'unsigned int' (instead of 'int') after all.
Sasha
>
> return p_sw;
> } /* __osm_ftree_sw_create() */
> --
> 1.6.1
>
More information about the general
mailing list