Skip to contentSkip to conversation

opensm/osm_mtree.c: removing useless 'if' statement

PATCH Applied Yevgeny Kliteynik 2 participants 2 messages Sep 7, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_mtree.c: removing useless 'if' statement

p_mtn->max_children is an array - no point checking if it is NULL.

---
 opensm/opensm/osm_mtree.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
opensm/opensm/osm_mtree.c +4 -5
index b5ce73b..693d0d5 100644
@@ -73,11 +73,10 @@ void osm_mtree_destroy(IN osm_mtree_node_t * p_mtn)
 	if (p_mtn == NULL)
 		return;
 
-	if (p_mtn->child_array != NULL)
-		for (i = 0; i < p_mtn->max_children; i++)
-			if ((p_mtn->child_array[i] != NULL) &&
-			    (p_mtn->child_array[i] != OSM_MTREE_LEAF))
-				osm_mtree_destroy(p_mtn->child_array[i]);
+	for (i = 0; i < p_mtn->max_children; i++)
+		if ((p_mtn->child_array[i] != NULL) &&
+		    (p_mtn->child_array[i] != OSM_MTREE_LEAF))
+			osm_mtree_destroy(p_mtn->child_array[i]);
 
 	free(p_mtn);
 }
Signature · 6 lines
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 4C865202.9020105-VPRAkNaXOzVS1MOuV/[email protected]