struct weston_config_section *section;
int duration;
char *s, *client;
+ int ret;
section = weston_config_get_section(shell->compositor->config,
"screensaver", NULL, NULL);
section = weston_config_get_section(shell->compositor->config,
"shell", NULL, NULL);
- asprintf(&client, "%s/%s", weston_config_get_libexec_dir(),
- WESTON_SHELL_CLIENT);
+ ret = asprintf(&client, "%s/%s", weston_config_get_libexec_dir(),
+ WESTON_SHELL_CLIENT);
+ if (ret < 0)
+ client = NULL;
weston_config_section_get_string(section,
"client", &s, client);
free(client);
{
struct screenshooter *shooter = data;
char *screenshooter_exe;
+ int ret;
- asprintf(&screenshooter_exe, "%s/%s", weston_config_get_libexec_dir(),
- "/weston-screenshooter");
+ ret = asprintf(&screenshooter_exe, "%s/%s",
+ weston_config_get_libexec_dir(),
+ "/weston-screenshooter");
+ if (ret < 0) {
+ weston_log("Could not construct screenshooter path.\n");
+ return;
+ }
if (!shooter->client)
shooter->client = weston_client_launch(shooter->ec,
{
struct weston_config_section *section;
char *client;
+ int ret;
section = weston_config_get_section(text_backend->compositor->config,
"input-method", NULL, NULL);
- asprintf(&client, "%s/weston-keyboard",
- weston_config_get_libexec_dir());
+ ret = asprintf(&client, "%s/weston-keyboard",
+ weston_config_get_libexec_dir());
+ if (ret < 0)
+ client = NULL;
weston_config_section_get_string(section, "path",
&text_backend->input_method.path,
client);