[PATCH] current_mode already points to struct, memcmp takes its address incorrectly
Bryce Harrington
bryce at osg.samsung.com
Thu Mar 17 01:41:12 UTC 2016
On Thu, Mar 17, 2016 at 07:21:57AM +0800, comic fans wrote:
> I've created a bug here https://bugs.freedesktop.org/show_bug.cgi?id=94562
>
>
> >From 5cbdcc9e099d8da4e5a27aa9049029d98dbaf32c Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Wang=20Xin-yu=20=28=E7=8E=8B=E6=98=95=E5=AE=87=29?=
> <comicfans44 at gmail.com>
> Date: Wed, 16 Mar 2016 11:57:06 +0000
> Subject: [PATCH] current_mode already points to struct, memcmp takes its
> address incorrectly
>
> https://bugs.freedesktop.org/show_bug.cgi?id=94562
> ---
> src/compositor-drm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index e01f6b9..621414c 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -2212,7 +2212,7 @@ drm_output_choose_initial_mode(struct drm_output
> *output,
> height == drm_mode->base.height)
> configured = drm_mode;
>
> - if (memcmp(¤t_mode, &drm_mode->mode_info,
> + if (memcmp(current_mode, &drm_mode->mode_info,
> sizeof *current_mode) == 0)
> current = drm_mode;
>
Yep this looks correct.
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
More information about the wayland-devel
mailing list