Skip to content

Commit

Permalink
DAOS-16020 cart: Fix bad macro (#14569)
Browse files Browse the repository at this point in the history
- fix bad crt_env_get() macro that incorrectly expanded in single line statements

Signed-off-by: Alexander A Oganezov <[email protected]>
  • Loading branch information
frostedcmos authored Jun 20, 2024
1 parent 0bcf0f8 commit 7f80548
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/cart/crt_internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,11 @@ crt_env_fini(void)

/* Returns value if env was present at load time */
#define crt_env_get(name, val) \
D_ASSERT(crt_genvs.inited); \
if (crt_genvs._rc_##name == 0) \
*val = crt_genvs._##name;
do { \
D_ASSERT(crt_genvs.inited); \
if (crt_genvs._rc_##name == 0) \
*val = crt_genvs._##name; \
} while (0)

static inline void
crt_env_dump(void)
Expand Down

0 comments on commit 7f80548

Please sign in to comment.