lkml.org 
[lkml]   [2017]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 20/41] x86: Replace access to desc_struct:a/b fields
On Fri, 25 Aug 2017 16:02:02 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:

> On Fri, 25 Aug 2017, Boris Ostrovsky wrote:
>
> >
> > >
> > > Index: b/arch/x86/xen/enlighten_pv.c
> > > ===================================================================
> > > --- a/arch/x86/xen/enlighten_pv.c
> > > +++ b/arch/x86/xen/enlighten_pv.c
> > > @@ -494,7 +494,7 @@ static void __init xen_load_gdt_boot(con
> > > static inline bool desc_equal(const struct desc_struct *d1,
> > > const struct desc_struct *d2)
> > > {
> > > - return d1->a == d2->a && d1->b == d2->b;
> > > + return memcmp(d1, d2, sizeof(*d1));
> > > }
> >
> > Shouldn't this be !memcmp() ?
>
> Bah yes.

This is why I'm one of those that like to add the "== 0" to it. Because
I always get this wrong :-p

-- Steve

\
 
 \ /
  Last update: 2017-08-25 16:17    [W:0.045 / U:1.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site