From owner-cvs-src@FreeBSD.ORG Thu Dec 29 18:26:19 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59F0E16A41F; Thu, 29 Dec 2005 18:26:19 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61C0E43D78; Thu, 29 Dec 2005 18:26:02 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id E913811707; Thu, 29 Dec 2005 19:25:59 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68805-09; Thu, 29 Dec 2005 19:25:54 +0100 (CET) Received: from cream.xbsd.org (cream.xbsd.org [192.168.42.6]) by smtp.xbsd.org (Postfix) with ESMTP id C662E11439; Thu, 29 Dec 2005 19:25:53 +0100 (CET) From: Florent Thoumie To: cvs-src@freebsd.org Date: Thu, 29 Dec 2005 19:25:48 +0100 User-Agent: KMail/1.8.2 References: <200512291744.jBTHifRr067385@repoman.freebsd.org> <200512291918.52021.flz@xbsd.org> In-Reply-To: <200512291918.52021.flz@xbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1333606.hTfo3FvtFk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200512291925.53102.flz@xbsd.org> X-Virus-Scanned: amavisd-new at xbsd.org Cc: src-committers@freebsd.org, Alexander Leidinger , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/usb ums.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 18:26:19 -0000 --nextPart1333606.hTfo3FvtFk Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 29 December 2005 19:18, Florent Thoumie wrote: > On Thursday 29 December 2005 18:44, Alexander Leidinger wrote: > > netchild 2005-12-29 17:44:40 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/dev/usb ums.c > > Log: > > Merge NetBSD rev. 1.61: > > - Support more than 7 buttons for USB mice. Patch from NetBSD > > kern/30248. > > I was looking at this PR two or three days ago and I found this in ums.c > which made me think this simple patch could be harmful. > > u_char buttons =3D 0; > int i; > [...] > #define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i)) > [...] > for (i =3D 0; i < sc->nbuttons; i++) > if (hid_get_data(ibuf, &sc->sc_loc_btn[i])) > buttons |=3D (1 << UMS_BUT(i)); > > I think this won't fit in u_char, what about uint32_t ? Or a mere int actually. =2D-=20 =46lorent Thoumie flz@FreeBSD.org =46reeBSD Committer --nextPart1333606.hTfo3FvtFk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDtCoxMxEkbVFH3PQRAnjmAJoDT3kxzU7u+9uvCADoUGScuOz25gCfRe6+ hm8L+rybcCFt72rGf4Te+fk= =FX53 -----END PGP SIGNATURE----- --nextPart1333606.hTfo3FvtFk--