After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727011 - wayland: Use a GPtrArray for the X server arguments array
wayland: Use a GPtrArray for the X server arguments array
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2014-03-25 11:01 UTC by Rui Matos
Modified: 2014-03-25 14:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Use a GPtrArray for the X server arguments array (2.11 KB, patch)
2014-03-25 11:01 UTC, Rui Matos
reviewed Details | Review
wayland: Use an array initializer for the X server arguments (2.98 KB, patch)
2014-03-25 13:58 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2014-03-25 11:01:03 UTC
See patch.
Comment 1 Rui Matos 2014-03-25 11:01:05 UTC
Created attachment 272838 [details] [review]
wayland: Use a GPtrArray for the X server arguments array

This fixes the unitialized array members introduced previously and
should avoid such mistakes again going forward.
Comment 2 Jasper St. Pierre (not reading bugmail) 2014-03-25 13:14:34 UTC
Review of attachment 272838 [details] [review]:

Can we do:

    char *args[] = { XWAYLAND_PATH, manager->display_name, "-wayland", "-rootless", ... };

instead?
Comment 3 Rui Matos 2014-03-25 13:33:34 UTC
(In reply to comment #2)
> Can we do:
> 
>     char *args[] = { XWAYLAND_PATH, manager->display_name, "-wayland",
> "-rootless", ... };
> 
> instead?

If we hardcode manager->display_name to be ":0", which is basically what we are doing already, then yes.
Comment 4 Rui Matos 2014-03-25 13:58:51 UTC
Created attachment 272852 [details] [review]
wayland: Use an array initializer for the X server arguments

--

Ok, this avoids the GPtrArray.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-03-25 14:09:04 UTC
Review of attachment 272852 [details] [review]:

Thanks, this looks good.
Comment 6 Rui Matos 2014-03-25 14:16:20 UTC
Attachment 272852 [details] pushed as 7484d54 - wayland: Use an array initializer for the X server arguments