[openib-general] {PATCH] Some small fixes in osm_mcast_mgr.c

Hal Rosenstock halr at voltaire.com
Fri Jun 2 04:53:40 PDT 2006


OpenSM/osm_mcast_mgr.c: Small cleanup in terms of dump file

Some small cleanup near old dump file removing: replacing
CL_ASSERT() with debug-unconditional check and then remove check before
freeing.

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

Index: opensm/osm_mcast_mgr.c
===================================================================
--- opensm/osm_mcast_mgr.c	(revision 7614)
+++ opensm/osm_mcast_mgr.c	(working copy)
@@ -1466,18 +1466,17 @@ __unlink_mcast_fdb(IN osm_mcast_mgr_t* c
 {
   char *file_name = NULL;
 
+  /* remove the old fdb dump file: */
   file_name =
     (char*)cl_malloc(strlen(p_mgr->p_subn->opt.dump_files_dir) + 12);
 
-  CL_ASSERT(file_name);
-
-  strcpy(file_name, p_mgr->p_subn->opt.dump_files_dir);
-  strcat(file_name, "/osm.mcfdbs");
-
-  unlink(file_name);
-
-  if (file_name)
+  if( file_name )
+  {
+    strcpy(file_name, p_mgr->p_subn->opt.dump_files_dir);
+    strcat(file_name, "/osm.mcfdbs");
+    unlink(file_name);
     cl_free(file_name);
+  }
 }
 
 /**********************************************************************







More information about the general mailing list