Skip to content

Commit

Permalink
Add requested changes of @jsquyres
Browse files Browse the repository at this point in the history
Mainly to satisfy the coding style.

Signed-off-by: guserav <erik.zeiske@web.de>
  • Loading branch information
guserav committed Jun 4, 2019
1 parent 48c228f commit 36fa464
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions opal/mca/btl/ofi/btl_ofi_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,20 @@ void mca_btl_ofi_exit(void)
exit(1);
}

static int is_in_list(char * const *list, const char *item)
static bool is_in_list(char * const *list, const char *item)
{
int i;

if (!list)
return 0;
if (!list) {
return false;
}
for (i = 0; list[i]; i++) {
if (!strcmp(list[i], item))
return 1;
if (!strcmp(list[i], item)) {
return true;
}
}

return 0;
return false;
}

/*
Expand Down Expand Up @@ -355,8 +357,9 @@ static mca_btl_base_module_t **mca_btl_ofi_component_init (int *num_btl_modules,
char **exclude_list = NULL;
char *prov_name;

if (prov_exclude)
if (prov_exclude) {
exclude_list = opal_argv_split(prov_exclude, ',');
}
for (info = info_list; info; info = info->next) {
prov_name = info->fabric_attr->prov_name;
opal_output_verbose(1, opal_btl_base_framework.framework_output,
Expand All @@ -371,8 +374,9 @@ static mca_btl_base_module_t **mca_btl_ofi_component_init (int *num_btl_modules,
continue;
}
rc = validate_info(info, required_caps);
if (OPAL_SUCCESS != rc)
if (OPAL_SUCCESS != rc) {
continue;
}
/* Device passed sanity check, let's make a module.
* We only pick the first device we found valid */
rc = mca_btl_ofi_init_device(info);
Expand Down

0 comments on commit 36fa464

Please sign in to comment.