diff --git a/sys/dev/ic/ninjascsi32.c b/sys/dev/ic/ninjascsi32.c index 227fbca0693c..4a21e965ab1a 100644 --- a/sys/dev/ic/ninjascsi32.c +++ b/sys/dev/ic/ninjascsi32.c @@ -1,4 +1,4 @@ -/* $NetBSD: ninjascsi32.c,v 1.12 2007/10/19 11:59:57 ad Exp $ */ +/* $NetBSD: ninjascsi32.c,v 1.13 2007/10/29 03:17:24 itohy Exp $ */ /*- * Copyright (c) 2004, 2006 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.12 2007/10/19 11:59:57 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.13 2007/10/29 03:17:24 itohy Exp $"); #include #include @@ -2387,8 +2387,8 @@ njsc32_intr(void *arg) idbit = njsc32_read_1(sc, NJSC32_REG_RESELECT_ID); if ((idbit & (1 << NJSC32_INITIATOR_ID)) == 0 || - (sc->sc_reselid = ffs(idbit & ~NJSC32_INITIATOR_ID) -1) - < 0) { + (sc->sc_reselid = + ffs(idbit & ~(1 << NJSC32_INITIATOR_ID)) - 1) < 0) { printf("%s: invalid reselection (id: %#x)\n", sc->sc_dev.dv_xname, idbit); sc->sc_stat = NJSC32_STAT_IDLE; /* XXX ? */