[openib-general] [PATCH TRIVIAL] opensm: eliminate some local variable

Sasha Khapyorsky sashak at voltaire.com
Sun Jan 7 12:38:19 PST 2007


This trivially eliminates some local variable.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/opensm/osm_mcast_mgr.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/osm/opensm/osm_mcast_mgr.c b/osm/opensm/osm_mcast_mgr.c
index 404e8c4..e893bc0 100644
--- a/osm/opensm/osm_mcast_mgr.c
+++ b/osm/opensm/osm_mcast_mgr.c
@@ -1104,7 +1104,6 @@ osm_mcast_mgr_process_single(
 {
   uint8_t                  port_num;
   uint16_t                 mlid_ho;
-  osm_switch_t*            p_sw;
   ib_net64_t               sw_guid;
   osm_port_t*              p_port;
   osm_physp_t*             p_physp;
@@ -1206,8 +1205,7 @@ osm_mcast_mgr_process_single(
     goto Exit;
   }
 
-  p_sw = p_remote_node->sw;
-  if( !p_sw )
+  if( !p_remote_node->sw )
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
              "osm_mcast_mgr_process_single: ERR 0A12: "
@@ -1217,7 +1215,7 @@ osm_mcast_mgr_process_single(
     goto Exit;
   }
 
-  if( osm_switch_is_in_mcast_tree( p_sw, mlid_ho ) )
+  if( osm_switch_is_in_mcast_tree( p_remote_node->sw, mlid_ho ) )
   {
     /*
       We're in luck.  The switch attached to this port
@@ -1234,7 +1232,7 @@ osm_mcast_mgr_process_single(
       port_num = osm_physp_get_port_num( p_remote_physp );
       CL_ASSERT( port_num );
 
-      p_mcast_tbl = osm_switch_get_mcast_tbl_ptr( p_sw );
+      p_mcast_tbl = osm_switch_get_mcast_tbl_ptr( p_remote_node->sw );
       osm_mcast_tbl_set( p_mcast_tbl, mlid_ho, port_num );
     }
     else
-- 
1.5.0.rc0.g2484-dirty





More information about the general mailing list