[PATCH weston v3 07/17] compositor-wayland: refactor load_wayland_backend

Pekka Paalanen ppaalanen at gmail.com
Fri May 6 13:10:52 UTC 2016


On Thu,  5 May 2016 22:45:45 +0200
Benoit Gschwind <gschwind at gnu-log.net> wrote:

> Rename config to wc in load_wayland_backend function.
> 
> Signed-off-by: Benoit Gschwind <gschwind at gnu-log.net>
> ---
>  src/main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/main.c b/src/main.c
> index a84bdeb..2ff8cd7 100644
> --- a/src/main.c
> +++ b/src/main.c
> @@ -1041,7 +1041,7 @@ wayland_backend_config_add_new_output(struct weston_wayland_backend_config *new_
>  
>  static int
>  load_wayland_backend(struct weston_compositor *c, char const * backend,
> -		     int *argc, char *argv[], struct weston_config *config)
> +		     int *argc, char *argv[], struct weston_config *wc)
>  {
>  	struct weston_wayland_backend_config new_config = {{ 0, }};
>  	struct weston_config_section *section;
> @@ -1078,7 +1078,7 @@ load_wayland_backend(struct weston_compositor *c, char const * backend,
>  	new_config.base.struct_size = sizeof(struct weston_wayland_backend_config);
>  	new_config.base.struct_version = WESTON_WAYLAND_BACKEND_CONFIG_VERSION;
>  
> -	section = weston_config_get_section(config, "shell", NULL, NULL);
> +	section = weston_config_get_section(wc, "shell", NULL, NULL);
>  	weston_config_section_get_string(section, "cursor-theme",
>  					 &new_config.cursor_theme, NULL);
>  	weston_config_section_get_int(section, "cursor-size",
> @@ -1110,7 +1110,7 @@ load_wayland_backend(struct weston_compositor *c, char const * backend,
>  	}
>  
>  	section = NULL;
> -	while (weston_config_next_section(config, &section, &section_name)) {
> +	while (weston_config_next_section(wc, &section, &section_name)) {
>  		if (!section_name || strcmp(section_name, "output") != 0)
>  			continue;
>  		weston_config_section_get_string(section, "name", &name, NULL);

Hi,

since you need the name 'config' for a different purpose in a later
patch, this is ok. You should say that in the commit message though. I
had to guess this might be the case and check before sending this
review.

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160506/8ee79449/attachment-0001.sig>


More information about the wayland-devel mailing list