From owner-svn-src-stable@FreeBSD.ORG Thu May 24 01:24:50 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 668141065670; Thu, 24 May 2012 01:24:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515428FC15; Thu, 24 May 2012 01:24:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4O1Oo1i006533; Thu, 24 May 2012 01:24:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4O1OoOS006530; Thu, 24 May 2012 01:24:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201205240124.q4O1OoOS006530@svn.freebsd.org> From: Alexander Motin Date: Thu, 24 May 2012 01:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235867 - in stable/8: lib/libusbhid sys/dev/usb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2012 01:24:50 -0000 Author: mav Date: Thu May 24 01:24:49 2012 New Revision: 235867 URL: http://svn.freebsd.org/changeset/base/235867 Log: MFC r235510: HID Report ID is unsigned value, so clear the rest of bits from possible sign expansion. Modified: stable/8/lib/libusbhid/parse.c stable/8/sys/dev/usb/usb_hid.c Directory Properties: stable/8/lib/libusbhid/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/lib/libusbhid/parse.c ============================================================================== --- stable/8/lib/libusbhid/parse.c Thu May 24 01:23:30 2012 (r235866) +++ stable/8/lib/libusbhid/parse.c Thu May 24 01:24:49 2012 (r235867) @@ -392,7 +392,7 @@ hid_get_item(hid_data_t s, hid_item_t *h s->loc_size = dval & mask; break; case 8: - hid_switch_rid(s, c, dval); + hid_switch_rid(s, c, dval & mask); break; case 9: /* mask because value is unsigned */ Modified: stable/8/sys/dev/usb/usb_hid.c ============================================================================== --- stable/8/sys/dev/usb/usb_hid.c Thu May 24 01:23:30 2012 (r235866) +++ stable/8/sys/dev/usb/usb_hid.c Thu May 24 01:24:49 2012 (r235867) @@ -425,7 +425,7 @@ hid_get_item(struct hid_data *s, struct s->loc_size = dval & mask; break; case 8: - hid_switch_rid(s, c, dval); + hid_switch_rid(s, c, dval & mask); break; case 9: /* mask because value is unsigned */