ac18: arch/i386/traps.c:546: warning: `and' of mutually exclusive equal-tests is always zero

From: Roger Larsson (roger.larsson@norran.net)
Date: Tue Jun 13 2000 - 16:47:02 EST


Compiled with silent... got a warning I have not seen previously

- if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE)
+ if ((tsk->ptrace & PT_DTRACE) && (!tsk->ptrace&PT_PTRACED))

shouldn't it be

- if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE)
+ if ((tsk->ptrace & PT_DTRACE) && !(tsk->ptrace&PT_PTRACED))

or the rather unreadable

- if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE)
+ if ((tsk->ptrace & PT_DTRACE) && (~tsk->ptrace&PT_PTRACED))

/RogerL

--
Home page:
  http://www.norran.net/nra02596/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:29 EST