opensm/osm_mtree.c: removing useless 'if' statement
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.
Signed-off-by Yevgeny Kliteynik <[email protected]>
--- opensm/opensm/osm_mtree.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
opensm/opensm/osm_mtree.c +4 -5
@@ -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]
Sasha Khapyorsky
AppliedQuoted 3 lines · Yevgeny Kliteynik
p_mtn->max_childrenis an array - no point checking if it is NULL.Signed-off-by Yevgeny Kliteynik <[email protected]>
Applied. Thanks.
Sasha
--
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