[PATCH] current_mode already points to struct, memcmp takes its address incorrectly

Pekka Paalanen ppaalanen at gmail.com
Thu Mar 17 12:40:32 UTC 2016


On Wed, 16 Mar 2016 18:41:12 -0700
Bryce Harrington <bryce at osg.samsung.com> wrote:

> 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(&current_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>

Right.

However:

git am -3 /home/pq/.claws-mail/imapcache/imap.gmail.com/ppaalanen at gmail.com/lists/wayland-devel/26537
-----------------------------------------------------------------------
Applying: current_mode already points to struct, memcmp takes its address incorrectly
fatal: corrupt patch at line 10

It seems your email-client has line-wrapped the code and there is HTML
junk after it. This time, I applied your change by rewriting the patch.
In the future, please use git-send-email to avoid the hassle.

Pushed:
   720e0c9..7a5c562  master -> master


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/20160317/fd19ad19/attachment.sig>


More information about the wayland-devel mailing list