logitec usb wireless mouse

mw at kpnqwest.ch mw at kpnqwest.ch
Sun Feb 6 04:35:42 PST 2005


> > +       bzero (&h, sizeof (h));
> >         for (d = hid_start_parse(buf, len, 1<<k); hid_get_item(d, &h); )
> > -               if (h.report_ID != 0)
> > +               if (h.report_ID != 0 && !id)
> 
> Is the real magic the "&& !id"?  My read of the code doesn't see the need
> for the bzero as hid_get_item should be filling 'h'.

Yup, I'm just the paranoid type of person who likes to have properly
(as opposed to magically;-)) initialized structures.

Markus


More information about the freebsd-current mailing list