Fix a bug in HID Pop handling. From UCHIYAMA Yasushi.

This commit is contained in:
augustss 2000-04-06 22:58:32 +00:00
parent 744f0f6486
commit af0c0d535a

View File

@ -1,4 +1,4 @@
/* $NetBSD: hid.c,v 1.13 2000/03/27 12:33:53 augustss Exp $ */ /* $NetBSD: hid.c,v 1.14 2000/04/06 22:58:32 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */ /* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */
/* /*
@ -126,7 +126,7 @@ hid_get_item(s, h)
{ {
struct hid_item *c = &s->cur; struct hid_item *c = &s->cur;
unsigned int bTag, bType, bSize; unsigned int bTag, bType, bSize;
struct hid_location oldloc; u_int32_t oldpos;
u_char *data; u_char *data;
int32_t dval; int32_t dval;
u_char *p; u_char *p;
@ -300,9 +300,9 @@ hid_get_item(s, h)
break; break;
case 11: /* Pop */ case 11: /* Pop */
hi = c->next; hi = c->next;
oldloc = c->loc; oldpos = c->loc.pos;
s->cur = *hi; s->cur = *hi;
c->loc = oldloc; c->loc.pos = oldpos;
free(hi, M_TEMP); free(hi, M_TEMP);
break; break;
default: default: