1
1

Remove all useless variables. Minor cleanups.

This commit was SVN r10000.
Этот коммит содержится в:
George Bosilca 2006-05-21 05:53:22 +00:00
родитель 9165882c07
Коммит e43fbd0082
2 изменённых файлов: 15 добавлений и 19 удалений

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

@ -146,26 +146,24 @@ static inline mca_bml_base_btl_t* mca_bml_base_btl_array_insert(mca_bml_base_btl
* @param array (IN) * @param array (IN)
* @param btl (IN) * @param btl (IN)
*/ */
static inline bool mca_bml_base_btl_array_remove(mca_bml_base_btl_array_t* array, static inline bool mca_bml_base_btl_array_remove( mca_bml_base_btl_array_t* array,
struct mca_btl_base_module_t* btl) { struct mca_btl_base_module_t* btl )
size_t i=0, index; {
bool found = false; size_t i = 0;
/* find the btl */ /* find the btl */
for(i=0; i<array->arr_size; i++) { for( i = 0; i < array->arr_size; i++ ) {
if(array->bml_btls[i].btl == btl) { if( array->bml_btls[i].btl == btl ) {
found = true; for( ; i < array->arr_size; i++ ) {
} /* move all btl's back by 1, so the found
if(found) { btl is "removed" */
/* move all btl's back by 1, so the found array->bml_btls[i] = array->bml_btls[(i+1)];
btl is "removed" */ }
array->bml_btls[i] = array->bml_btls[(i+1)]; array->arr_size--;
array->arr_index = 0;
return true;
} }
} }
if(found) { return false;
array->arr_size--;
array->arr_index = 0;
}
return found;
} }

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

@ -564,8 +564,6 @@ int mca_bml_r2_del_btl(mca_btl_base_module_t* btl)
int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl) int mca_bml_r2_del_proc_btl(ompi_proc_t* proc, mca_btl_base_module_t* btl)
{ {
mca_bml_base_endpoint_t* ep = (mca_bml_base_endpoint_t*)proc->proc_pml; mca_bml_base_endpoint_t* ep = (mca_bml_base_endpoint_t*)proc->proc_pml;
mca_btl_base_component_progress_fn_t * btl_progress_new;
int i, j;
double total_bandwidth = 0; double total_bandwidth = 0;
size_t b; size_t b;