diff options
author | 2014-05-18 15:27:28 +0000 | |
---|---|---|
committer | 2014-05-18 15:27:28 +0000 | |
commit | 85c77397519522a5af92f59e210aaf853ef86b8f (patch) | |
tree | 99becf8db237ad2f2adc4259b362dffb0dda3c19 | |
parent | Don't add a lease to the leases TAILQ more than once. It tends to (diff) | |
download | wireguard-openbsd-85c77397519522a5af92f59e210aaf853ef86b8f.tar.xz wireguard-openbsd-85c77397519522a5af92f59e210aaf853ef86b8f.zip |
Fix tail packet check in elantech v3 touchpad code. Due to a typo this
code was masking out bits which were also tested in the same expression.
Reported by cppcheck via jsg@ (Expression '(X & 0xfc) != 0x2' is always true).
Tested with Elantech Touchpad, version 3, firmware 0x250f00.
-rw-r--r-- | sys/dev/pckbc/pms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index 4a6de176166..4799c8c7438 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.50 2014/04/25 10:33:36 mpi Exp $ */ +/* $OpenBSD: pms.c,v 1.51 2014/05/18 15:27:28 stsp Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -2189,7 +2189,7 @@ pms_proc_elantech_v3(struct pms_softc *sc) * the tail packet. */ if ((sc->packet[0] & 0x0c) != 0x04 && - (sc->packet[3] & 0xfc) != 0x02) { + (sc->packet[3] & 0xcf) != 0x02) { /* not the head packet -- ignore */ return; } |