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.
This commit is contained in:
bjh21 2001-02-13 01:14:45 +00:00
parent d5cb949785
commit 3cbd9caea7

View File

@ -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 <sys/cdefs.h>
__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