PR/51933: David Binderman: Boolean confusion

This commit is contained in:
christos 2017-02-01 14:33:10 +00:00
parent f64047ef62
commit 3db65f612e

View File

@ -1,4 +1,4 @@
/* $NetBSD: leo.c,v 1.21 2014/07/25 08:10:32 dholland Exp $ */
/* $NetBSD: leo.c,v 1.22 2017/02/01 14:33:10 christos Exp $ */
/*-
* Copyright (c) 1997 maximum entropy <entropy@zippy.bernstein.com>
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.21 2014/07/25 08:10:32 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.22 2017/02/01 14:33:10 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -333,9 +333,9 @@ leo_scroll(struct leo_softc *sc, int scroll)
if ((scroll < 0) || (scroll > 255))
return EINVAL;
bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_MSBSCROLL,
(scroll >> 6) && 0xff);
(scroll >> 6) & 0xff);
bus_space_write_1(sc->sc_iot, sc->sc_ioh, LEO_REG_LSBSCROLL,
(scroll << 2) && 0xff);
(scroll << 2) & 0xff);
return 0;
}