[openib-general] [PATCH] OpenSM/complib: Fix assertion in cl_ptr_vector.h::cl_ptr_vector_get

Hal Rosenstock halr at voltaire.com
Wed Jan 25 08:58:03 PST 2006


OpenSM/complib: Fix assertion in cl_ptr_vector.h::cl_ptr_vector_get

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

Index: include/complib/cl_ptr_vector.h
===================================================================
--- include/complib/cl_ptr_vector.h     (revision 5182)
+++ include/complib/cl_ptr_vector.h     (working copy)
@@ -416,7 +416,7 @@ cl_ptr_vector_get(
 {
        CL_ASSERT( p_vector );
        CL_ASSERT( p_vector->state == CL_INITIALIZED );
-       CL_ASSERT( p_vector->size > index );
+       CL_ASSERT( p_vector->size >= index );
 
        return( (void*)p_vector->p_ptr_array[index] );
 }





More information about the general mailing list