[openib-general] [PATCH] [MINOR] OpenSM/osm_mcast_mgr.c: Minor simplification in osm_mcast_mgr_process_mgrp_cb

Hal Rosenstock halr at voltaire.com
Wed Nov 29 08:01:36 PST 2006


OpenSM/osm_mcast_mgr.c: Minor simplification in
osm_mcast_mgr_process_mgrp_cb

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_mcast_mgr.c
===================================================================
--- opensm/osm_mcast_mgr.c	(revision 10180)
+++ opensm/osm_mcast_mgr.c	(working copy)
@@ -1649,7 +1649,7 @@ osm_mcast_mgr_process_mgrp_cb(
   osm_mcast_mgr_t* p_mgr = (osm_mcast_mgr_t*)Context1;
   osm_mgrp_t* p_mgrp;
   ib_net16_t  mlid;
-  osm_signal_t signal;
+  osm_signal_t signal = OSM_SIGNAL_DONE;
   osm_mcast_mgr_ctxt_t* p_ctxt = (osm_mcast_mgr_ctxt_t*)Context2;
   osm_mcast_req_type_t req_type = p_ctxt->req_type;
   ib_net64_t port_guid = p_ctxt->port_guid;
@@ -1677,7 +1677,6 @@ osm_mcast_mgr_process_mgrp_cb(
     */
     if ( p_mgrp->last_change_id == p_mgrp->last_tree_id)
     {
-      signal = OSM_SIGNAL_DONE;
       osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                "osm_mcast_mgr_process_mgrp_cb: "
                "Skip processing mgrp with lid:0x%X change id:%u\n",
@@ -1715,16 +1714,9 @@ osm_mcast_mgr_process_mgrp_cb(
 
       osm_mgrp_destroy(p_mgrp);
     }
-
-    CL_PLOCK_RELEASE( p_mgr->p_lock );
-    OSM_LOG_EXIT( p_mgr->p_log );
-    return signal;
-  }
-  else
-  {
-    CL_PLOCK_RELEASE( p_mgr->p_lock );
-    OSM_LOG_EXIT( p_mgr->p_log );
-    return OSM_SIGNAL_DONE;
   }
 
+  CL_PLOCK_RELEASE( p_mgr->p_lock );
+  OSM_LOG_EXIT( p_mgr->p_log );
+  return signal;
 }







More information about the general mailing list