[ofa-general] [PATCH] opensm/osm_ucast_ftree.c: Removed useless initialisation on switch indexes

Nicolas Morey Chaisemartin nicolas.morey-chaisemartin at ext.bull.net
Tue Mar 3 07:52:28 PST 2009


Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin at ext.bull.net>
---
There is no need to initialize these values to 0 as the struct has been memset to 0 after its allocation.

 opensm/opensm/osm_ucast_ftree.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/opensm/opensm/osm_ucast_ftree.c b/opensm/opensm/osm_ucast_ftree.c
index d92265b..6e2e7de 100644
--- a/opensm/opensm/osm_ucast_ftree.c
+++ b/opensm/opensm/osm_ucast_ftree.c
@@ -561,14 +561,10 @@ static ftree_sw_t *__osm_ftree_sw_create(IN ftree_fabric_t * p_ftree,
 					   sizeof(ftree_port_group_t *));
 	if (!p_sw->down_port_groups || !p_sw->up_port_groups)
 		return NULL;
-	p_sw->down_port_groups_num = 0;
-	p_sw->up_port_groups_num = 0;
 
 	/* initialize lft buffer */
 	memset(p_osm_sw->new_lft, OSM_NO_PATH, IB_LID_UCAST_END_HO + 1);
 
-	p_sw->down_port_groups_idx = 0;
-
 	return p_sw;
 }				/* __osm_ftree_sw_create() */
 
-- 
1.6.2-rc2.GIT




More information about the general mailing list