Message ID | 4B6828B6.5050005@dev.mellanox.co.il (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/opensm/complib/cl_ptr_vector.c b/opensm/complib/cl_ptr_vector.c index 8ccb9f0..36db4db 100644 --- a/opensm/complib/cl_ptr_vector.c +++ b/opensm/complib/cl_ptr_vector.c @@ -302,7 +302,8 @@ size_t cl_ptr_vector_find_from_end(IN const cl_ptr_vector_t * const p_vector, while (i) { /* Invoke the callback for the current element. */ - if (pfn_callback(i, (void *)p_vector->p_ptr_array[--i], + i--; + if (pfn_callback(i, (void *)p_vector->p_ptr_array[i], (void *)context) == CL_SUCCESS) { return (i); }