Date: Wed, 16 May 2012 17:51:56 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235510 - in head: lib/libusbhid sys/dev/usb Message-ID: <201205161751.q4GHpuce054494@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed May 16 17:51:56 2012 New Revision: 235510 URL: http://svn.freebsd.org/changeset/base/235510 Log: HID Report ID is unsigned value, so clear the rest of bits from possible sign expansion. Modified: head/lib/libusbhid/parse.c head/sys/dev/usb/usb_hid.c Modified: head/lib/libusbhid/parse.c ============================================================================== --- head/lib/libusbhid/parse.c Wed May 16 17:26:14 2012 (r235509) +++ head/lib/libusbhid/parse.c Wed May 16 17:51:56 2012 (r235510) @@ -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: head/sys/dev/usb/usb_hid.c ============================================================================== --- head/sys/dev/usb/usb_hid.c Wed May 16 17:26:14 2012 (r235509) +++ head/sys/dev/usb/usb_hid.c Wed May 16 17:51:56 2012 (r235510) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205161751.q4GHpuce054494>