[openib-general] [PATCH] OpenSM - fix CL_ASSERT before variable declaration

Yael Kalka yael at mellanox.co.il
Sun Mar 12 05:15:26 PST 2006


Hi Hal,

The following patch fixes changes inserted in the last patch on
osm_lid_mgr.c, and break the window trunk compilation.
As was discussed before -the CL_ASSERT should be called only after all
the variable declarations. This patch moves the declaration of p_pi to
be before the CL_ASSERT.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: opensm/osm_lid_mgr.c
===================================================================
--- opensm/osm_lid_mgr.c	(revision 5753)
+++ opensm/osm_lid_mgr.c	(working copy)
@@ -900,10 +900,11 @@ __osm_lid_mgr_set_remote_pi_state_to_ini
   IN osm_lid_mgr_t *       const p_mgr,
   IN osm_physp_t*          const p_physp)
 {
+  ib_port_info_t *p_pi;
   osm_physp_t *p_rem_port = osm_physp_get_remote(p_physp);
   CL_ASSERT(p_rem_port);
 
-  ib_port_info_t * p_pi = osm_physp_get_port_info_ptr( p_rem_port );
+  p_pi = osm_physp_get_port_info_ptr( p_rem_port );
   ib_port_info_set_port_state( p_pi, IB_LINK_INIT );
 }
 




More information about the general mailing list