From 3cbd9caea7a5a032af55232dfcc08b6fa672716e Mon Sep 17 00:00:00 2001 From: bjh21 Date: Tue, 13 Feb 2001 01:14:45 +0000 Subject: [PATCH] Fix an uninitialised variable which could have caused corruption of the user button state (and hence spurious mouse clicks) if the event queue filled up. --- sys/dev/wscons/wsmouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index 809dfba5b526..36ff28c82710 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsmouse.c,v 1.12 2000/05/01 07:36:58 takemura Exp $ */ +/* $NetBSD: wsmouse.c,v 1.13 2001/02/13 01:14:45 bjh21 Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.12 2000/05/01 07:36:58 takemura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsmouse.c,v 1.13 2001/02/13 01:14:45 bjh21 Exp $"); /* * Copyright (c) 1992, 1993 @@ -322,6 +322,7 @@ wsmouse_input(wsmousedev, btns, x, y, z, flags) * of changes or out of room. As events get delivered, * mark them `unchanged'. */ + ub = sc->sc_ub; any = 0; get = evar->get; put = evar->put; @@ -409,7 +410,6 @@ wsmouse_input(wsmousedev, btns, x, y, z, flags) } mb = sc->sc_mb; - ub = sc->sc_ub; while ((d = mb ^ ub) != 0) { /* * Mouse button change. Find the first change and drop