static void config_string_fini(struct config_string *str)
{
- config_string_set(str, NULL);
+ config_string_set(str, nullptr);
}
static void config_string_set_static(struct config_string *config_str, const char *value)
const char *home_path = utils_get_home_dir();
char *str;
- if (home_path == NULL) {
+ if (home_path == nullptr) {
ERR("Can't get HOME directory for sockets creation.");
ret = -1;
goto end;
goto end;
}
config_string_set(&config->rundir, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_HOME_APPS_UNIX_SOCK, home_path);
if (ret < 0) {
goto end;
}
config_string_set(&config->apps_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_HOME_CLIENT_UNIX_SOCK, home_path);
if (ret < 0) {
goto end;
}
config_string_set(&config->client_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_HOME_APPS_WAIT_SHM_PATH, getuid());
if (ret < 0) {
goto end;
}
config_string_set(&config->wait_shm_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_HOME_HEALTH_UNIX_SOCK, home_path);
if (ret < 0) {
goto end;
}
config_string_set(&config->health_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = 0;
end:
goto error;
}
config_string_set(&config->consumerd32_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_USTCONSUMERD32_ERR_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->consumerd32_err_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_USTCONSUMERD32_CMD_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->consumerd32_cmd_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
/* 64 bits consumerd path setup */
ret = asprintf(&str, DEFAULT_USTCONSUMERD64_PATH, config->rundir.value);
goto error;
}
config_string_set(&config->consumerd64_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_USTCONSUMERD64_ERR_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->consumerd64_err_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_USTCONSUMERD64_CMD_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->consumerd64_cmd_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
/* kconsumerd consumerd path setup */
ret = asprintf(&str, DEFAULT_KCONSUMERD_PATH, config->rundir.value);
goto error;
}
config_string_set(&config->kconsumerd_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_KCONSUMERD_ERR_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->kconsumerd_err_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, DEFAULT_KCONSUMERD_CMD_SOCK_PATH, config->rundir.value);
if (ret < 0) {
goto error;
}
config_string_set(&config->kconsumerd_cmd_unix_sock_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_PIDFILE);
if (ret < 0) {
goto error;
}
config_string_set(&config->pid_file_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_LOCKFILE);
if (ret < 0) {
goto error;
}
config_string_set(&config->lock_file_path, str);
- str = NULL;
+ str = nullptr;
ret = asprintf(&str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_AGENTPORT_FILE);
if (ret < 0) {
goto error;
}
config_string_set(&config->agent_port_file_path, str);
- str = NULL;
+ str = nullptr;
/*
* Allow INSTALL_BIN_PATH to be used as a target path for the