Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/amd64/amd64
On Sat, Jun 16, 2012 at 08:31:42PM +0100, David Laight wrote:
> On Sat, Jun 16, 2012 at 04:42:27PM +0000, Joerg Sonnenberger wrote:
> > Module Name: src
> > Committed By: joerg
> > Date: Sat Jun 16 16:42:27 UTC 2012
> >
> > Modified Files:
> > src/sys/arch/amd64/amd64: machdep.c
> >
> > Log Message:
> > Annotate tautological if, so that clang doesn't warn about the dt usage
> > later on.
>
> There is something horribly wrong here!
> if (seg != GUDATA_SEL || seg != GUDATA32_SEL)
> return EINVAL;
> I suspect that should be && not ||
> As it is, the function will never accept a non-zero segment apart
> from ones in the LDT.
>
> Hmmm... those functions need making static and collapsing down to
> remove the never-set parameters.
I fully agree that there is something wrong going on here. Changing the
|| to && would make it reference an unset variable. This is more a
bandaid to give someone a clue that there really is something fishy
here...
Joerg
Home |
Main Index |
Thread Index |
Old Index