Skip to content

Commit

Permalink
DAOS-14532 gurt: Replace environment APIs hook
Browse files Browse the repository at this point in the history
fix clang-format issue and integrate reviewers comments:
- Use local variable

Allow-unstable-test: true
Features: mpiio dfuse
Required-githooks: true
Signed-off-by: Cedric Koch-Hofer <cedric.koch-hofer@intel.com>
  • Loading branch information
kanard38 authored and knard-intel committed Jan 19, 2024
1 parent 198bfe4 commit ff596d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ crt_lib_fini(void)
static void
dump_envariables(void)
{
int i;
char *val;
int i;

D_INFO("-- ENVARS: --\n");
for (i = 0; i < ARRAY_SIZE(crt_env_names); i++) {
char *val = NULL;

d_agetenv_str(&val, crt_env_names[i]);
if (val == NULL)
continue;
Expand Down
6 changes: 3 additions & 3 deletions src/cart/utils/crt_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@ crtu_dc_mgmt_net_cfg_setenv(const char *name)
}

D_INFO("CaRT env setup with:\n"
"\tOFI_INTERFACE=%s, OFI_DOMAIN: %s, CRT_PHY_ADDR_STR: %s, "
"CRT_CTX_SHARE_ADDR: %s, CRT_TIMEOUT: %s\n",
ofi_interface, ofi_domain, crt_phy_addr_str, crt_ctx_share_addr, crt_timeout);
"\tOFI_INTERFACE=%s, OFI_DOMAIN: %s, CRT_PHY_ADDR_STR: %s, "
"CRT_CTX_SHARE_ADDR: %s, CRT_TIMEOUT: %s\n",
ofi_interface, ofi_domain, crt_phy_addr_str, crt_ctx_share_addr, crt_timeout);

cleanup:
d_freeenv_str(&ofi_domain_env);
Expand Down

0 comments on commit ff596d2

Please sign in to comment.