[ofw] [Patch] [Core/al] Remove useless ASSERT

Alex Naslednikov xalex at mellanox.co.il
Thu Apr 29 05:13:32 PDT 2010


This patch removes the assert at user-mode because:
1. h_al can be NULL when we got into the al_destroy_cep as a result of a bad flow within qp_creation
2. h_al is only compared to other values; the code does not attempt to use it as a pointer

Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)

Index: D:/windows/MLNX_VPI_trunk/core/al/user/ual_cm_cep.c
===================================================================
--- D:/windows/MLNX_VPI_trunk/core/al/user/ual_cm_cep.c (revision 5850)
+++ D:/windows/MLNX_VPI_trunk/core/al/user/ual_cm_cep.c (revision 5851)
@@ -382,9 +382,13 @@
  DWORD  bytes_ret;

  AL_ENTER( AL_DBG_CM );
+
+#if DBG
+ if ( !h_al) {
+  AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("h_al == NULL, probably because qp creation was failed.\n") );
+ }
+#endif

- CL_ASSERT( h_al );
-
  cl_spinlock_acquire( &gp_cep_mgr->obj.lock );
  if( *p_cid < cl_ptr_vector_get_size( &gp_cep_mgr->cep_vector ) )
  {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20100429/e2f4f9d1/attachment.html>


More information about the ofw mailing list