1
1

Dont do anything if the array is already empty.

This commit was SVN r14325.
Этот коммит содержится в:
George Bosilca 2007-04-12 04:58:47 +00:00
родитель e7c4f1ca64
Коммит f5478d95df

Просмотреть файл

@ -173,6 +173,8 @@ ORTE_DECLSPEC int orte_pointer_array_set_size(orte_pointer_array_t *array, orte_
*/
static inline void orte_pointer_array_clear(orte_pointer_array_t *array)
{
if( array->number_free == array->size )
return; /* nothing to do here this time (the array is already empty) */
OPAL_THREAD_LOCK(&(array->lock));
/* set the array elements to NULL */
memset(array->addr, 0, array->size * sizeof(void*));