[IBAL] Fix improper end-of-list checks.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 23 Aug 2006 19:23:29 +0000 (19:23 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 23 Aug 2006 19:23:29 +0000 (19:23 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@461 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_mad.c

index 38a549b..97a5a5e 100644 (file)
@@ -1816,7 +1816,7 @@ ib_cancel_mad(
        p_list_item = cl_qlist_find_from_head( &h_mad_svc->send_list,\r
                __mad_svc_find_send, p_mad_element );\r
 \r
-       if( !p_list_item )\r
+       if( p_list_item == cl_qlist_end( &h_mad_svc->send_list ) )\r
        {\r
                cl_spinlock_release( &h_mad_svc->obj.lock );\r
                AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_MAD_SVC, ("mad not found\n") );\r
@@ -1877,7 +1877,7 @@ ib_delay_mad(
        p_list_item = cl_qlist_find_from_head( &h_mad_svc->send_list,\r
                __mad_svc_find_send, p_mad_element );\r
 \r
-       if( !p_list_item )\r
+       if( p_list_item == cl_qlist_end( &h_mad_svc->send_list ) )\r
        {\r
                cl_spinlock_release( &h_mad_svc->obj.lock );\r
                AL_PRINT( TRACE_LEVEL_INFORMATION, AL_DBG_MAD_SVC, ("MAD not found\n") );\r