Skip to content

Commit

Permalink
prov/ucx: Fix incorrect return value checking for fi_param_get()
Browse files Browse the repository at this point in the history
When reading the two runtime parameters the condition for the actions
was inverted by mistake.

Signed-off-by: Jianxin Xiong <[email protected]>
  • Loading branch information
j-xiong committed Dec 7, 2024
1 parent 65581c1 commit 8341970
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prov/ucx/src/ucx_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ int ucx_domain_open(struct fid_fabric *fabric, struct fi_info *info,
return -ENOMEM;

ofi_status = fi_param_get_size_t(NULL, "universe_size", &univ_size);
if (ofi_status) {
if (ofi_status == FI_SUCCESS) {
params.estimated_num_eps = univ_size;
params.field_mask |= UCP_PARAM_FIELD_ESTIMATED_NUM_EPS;
}
Expand Down
2 changes: 1 addition & 1 deletion prov/ucx/src/ucx_fabric.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static char* ucx_local_host_resolve()
char *result = NULL;

status = fi_param_get(&ucx_prov, "ns_iface", &iface);
if (!status)
if (status != FI_SUCCESS)
iface = NULL;

if (getifaddrs(&ifaddr) == -1) {
Expand Down

0 comments on commit 8341970

Please sign in to comment.