{\r
cl_status_t status;\r
void *p_object;\r
+ uint32_t i = 0;\r
\r
CL_ASSERT( p_list );\r
CL_ASSERT( cl_is_qpool_inited( &p_list->list_item_pool ) );\r
if( status != CL_SUCCESS )\r
{\r
/* Remove all items that have been inserted. */\r
- while( item_count++ < item_count )\r
+ while( i++ < item_count )\r
cl_list_remove_head( p_list );\r
return( status );\r
}\r
{\r
cl_status_t status;\r
void *p_object;\r
+ uint32_t i = 0;\r
\r
CL_ASSERT( p_list );\r
CL_ASSERT( cl_is_qpool_inited( &p_list->list_item_pool ) );\r
if( status != CL_SUCCESS )\r
{\r
/* Remove all items that have been inserted. */\r
- while( item_count++ < item_count )\r
+ while( i++ < item_count )\r
cl_list_remove_tail( p_list );\r
return( status );\r
}\r
while( i )\r
{\r
/* Invoke the callback for the current element. */\r
- if( pfn_callback( i, (void*)p_vector->p_ptr_array[--i],\r
+ if( pfn_callback( i, (void*)p_vector->p_ptr_array[i],\r
(void*)context ) == CL_SUCCESS )\r
{\r
return( i );\r
}\r
+ i--;\r
}\r
\r
return( p_vector->size );\r