mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
session.c: unconstify build_path() return value
This commit is contained in:
parent
f4f35a9dff
commit
f325335e16
1 changed files with 5 additions and 5 deletions
|
|
@ -73,7 +73,7 @@ read_environment_file(const char *filename)
|
||||||
fclose(stream);
|
fclose(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static char *
|
||||||
build_path(const char *dir, const char *filename)
|
build_path(const char *dir, const char *filename)
|
||||||
{
|
{
|
||||||
if (string_empty(dir) || string_empty(filename)) {
|
if (string_empty(dir) || string_empty(filename)) {
|
||||||
|
|
@ -112,12 +112,12 @@ session_environment_init(const char *dir)
|
||||||
*/
|
*/
|
||||||
setenv("XDG_CURRENT_DESKTOP", "wlroots", 0);
|
setenv("XDG_CURRENT_DESKTOP", "wlroots", 0);
|
||||||
|
|
||||||
const char *environment = build_path(dir, "environment");
|
char *environment = build_path(dir, "environment");
|
||||||
if (!environment) {
|
if (!environment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
read_environment_file(environment);
|
read_environment_file(environment);
|
||||||
free((void *)environment);
|
free(environment);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -126,7 +126,7 @@ session_autostart_init(const char *dir)
|
||||||
/* Update dbus and systemd user environment, each may fail gracefully */
|
/* Update dbus and systemd user environment, each may fail gracefully */
|
||||||
update_activation_env("DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP");
|
update_activation_env("DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP");
|
||||||
|
|
||||||
const char *autostart = build_path(dir, "autostart");
|
char *autostart = build_path(dir, "autostart");
|
||||||
if (!autostart) {
|
if (!autostart) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -139,5 +139,5 @@ session_autostart_init(const char *dir)
|
||||||
spawn_async_no_shell(cmd);
|
spawn_async_no_shell(cmd);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
out:
|
out:
|
||||||
free((void *)autostart);
|
free(autostart);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue