diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-07 10:32:14 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-01-07 10:32:14 +0000 |
commit | 2592821e1fd5f23463bf7bb84d55c1be9131d2ab (patch) | |
tree | ac1348ba0039633c12bdf1890104fbeb39f8ff2c /sys/dev/pckbc | |
parent | 1a480f56f6318bbda20936e3e81606852e54c42d (diff) |
Only MS IntelliMouse have a Z axis, prevent a false positive triggered
by -Wuninitialized reported by jsg@.
ok stsp@
Diffstat (limited to 'sys/dev/pckbc')
-rw-r--r-- | sys/dev/pckbc/pms.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index 79a5404443f..7b8a3b67576 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.54 2014/08/29 20:09:09 shadchin Exp $ */ +/* $OpenBSD: pms.c,v 1.55 2015/01/07 10:32:13 mpi Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -614,14 +614,10 @@ pms_proc_mouse(struct pms_softc *sc) dy = (sc->packet[0] & PMS_PS2_YNEG) ? (int)sc->packet[2] - 256 : sc->packet[2]; - switch (sc->protocol->type) { - case PMS_STANDARD: - dz = 0; - break; - case PMS_INTELLI: + if (sc->protocol->type == PMS_INTELLI) dz = (signed char)sc->packet[3]; - break; - } + else + dz = 0; wsmouse_input(sc->sc_wsmousedev, buttons, dx, dy, dz, 0, WSMOUSE_INPUT_DELTA); |