Skip to content

Commit

Permalink
- fix build errors, memset g_envs to 0
Browse files Browse the repository at this point in the history
Required-githooks: true

Signed-off-by: Alexander A Oganezov <[email protected]>
  • Loading branch information
frostedcmos committed Jun 4, 2024
1 parent 096319a commit 304b8bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,23 +519,23 @@ crt_protocol_info_free(struct crt_protocol_info *protocol_info)
int
crt_init_opt(crt_group_id_t grpid, uint32_t flags, crt_init_options_t *opt)
{
char *provider;
char *provider_env = NULL;
char *interface;
char *interface_env = NULL;
char *domain;
char *domain_env = NULL;
char *auth_key;
char *auth_key_env = NULL;
char *path;
bool server = flags & CRT_FLAG_BIT_SERVER;
int rc = 0;
char *provider_str0 = NULL;
char *provider_str1 = NULL;
crt_provider_t primary_provider;
crt_provider_t secondary_provider;
crt_provider_t tmp_prov;
char *port;
char *provider = NULL;
char *provider_env = NULL;
char *interface = NULL;
char *interface_env = NULL;
char *domain = NULL;
char *domain_env = NULL;
char *auth_key = NULL;
char *auth_key_env = NULL;
char *path = NULL;
char *provider_str0 = NULL;
char *provider_str1 = NULL;
char *port = NULL;
char *port_env = NULL;
char *port0 = NULL;
char *port1 = NULL;
Expand Down
1 change: 1 addition & 0 deletions src/cart/crt_internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ extern struct crt_envs_t g_envs;
static inline void
crt_env_init(void)
{
memset(&g_envs, 0x0, sizeof(struct crt_envs_t));
#define ENV(x) \
do { \
g_envs._rc_##x = d_getenv_uint(#x, &g_envs._##x); \
Expand Down

0 comments on commit 304b8bd

Please sign in to comment.