mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland: Use an array initializer for the X server arguments
This fixes the unitialized array members introduced previously and should avoid such mistakes again going forward. https://bugzilla.gnome.org/show_bug.cgi?id=727011
This commit is contained in:
parent
a55622d924
commit
7484d540cd
@ -303,8 +303,6 @@ meta_xwayland_start (MetaXWaylandManager *manager,
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
char **env;
|
char **env;
|
||||||
char *fd_string;
|
char *fd_string;
|
||||||
char *args[10];
|
|
||||||
GError *error;
|
|
||||||
|
|
||||||
wl_global_create (wl_display, &xserver_interface,
|
wl_global_create (wl_display, &xserver_interface,
|
||||||
META_XSERVER_VERSION,
|
META_XSERVER_VERSION,
|
||||||
@ -364,16 +362,17 @@ meta_xwayland_start (MetaXWaylandManager *manager,
|
|||||||
|
|
||||||
manager->display_name = g_strdup_printf (":%d", manager->display_index);
|
manager->display_name = g_strdup_printf (":%d", manager->display_index);
|
||||||
|
|
||||||
args[0] = XWAYLAND_PATH;
|
{
|
||||||
args[1] = manager->display_name;
|
GError *error = NULL;
|
||||||
args[2] = "-wayland";
|
gchar *args[] = { XWAYLAND_PATH,
|
||||||
args[3] = "-rootless";
|
manager->display_name,
|
||||||
args[4] = "-noreset";
|
"-wayland",
|
||||||
args[7] = "-nolisten";
|
"-rootless",
|
||||||
args[8] = "all";
|
"-noreset",
|
||||||
args[9] = NULL;
|
"-nolisten",
|
||||||
|
"all",
|
||||||
|
NULL };
|
||||||
|
|
||||||
error = NULL;
|
|
||||||
if (g_spawn_async (NULL, /* cwd */
|
if (g_spawn_async (NULL, /* cwd */
|
||||||
args,
|
args,
|
||||||
env,
|
env,
|
||||||
@ -396,6 +395,7 @@ meta_xwayland_start (MetaXWaylandManager *manager,
|
|||||||
{
|
{
|
||||||
g_error ("Failed to fork for xwayland server: %s", error->message);
|
g_error ("Failed to fork for xwayland server: %s", error->message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
g_strfreev (env);
|
g_strfreev (env);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user