[WSD] fix a nested loop in the function ibsp_dereg_hca()
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 21 Dec 2006 07:04:22 +0000 (07:04 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 21 Dec 2006 07:04:22 +0000 (07:04 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@565 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/wsd/user/ibsp_mem.c

index 0361e2c..a1f431c 100644 (file)
@@ -246,6 +246,7 @@ ibsp_dereg_hca(
        IN                              struct mr_list                          *mem_list )\r
 {\r
        cl_list_item_t *item;\r
+       cl_list_item_t *item1;\r
 \r
        IBSP_ENTER( IBSP_DBG_MEM );\r
 \r
@@ -264,13 +265,12 @@ ibsp_dereg_hca(
                 * Clear the pointer from the node to this registration.  No need\r
                 * to remove from the list as we're about to free the registration.\r
                 */\r
-               for( item = cl_qlist_head( &p_reg->node_list );\r
-                       item != cl_qlist_end( &p_reg->node_list );\r
-                       item = cl_qlist_next( item ) )\r
+               for( item1 = cl_qlist_head( &p_reg->node_list );\r
+                       item1 != cl_qlist_end( &p_reg->node_list );\r
+                       item1 = cl_qlist_next( item1 ) )\r
                {\r
                        struct memory_node *p_node =\r
-                               PARENT_STRUCT( item, struct memory_node, mr_item );\r
-\r
+                               PARENT_STRUCT( item1, struct memory_node, mr_item );\r
                        p_node->p_reg = NULL;\r
                }\r
 \r