> > Well, I don't. If you care about it, add a WARN_ON().
> > Checking without consequences is bad.
>
> Hi Oliver, how about this instead?
>
[..]
> -     clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed);
> +     if (ifnum < 8*sizeof(ps->ifclaimed))
> +             clear_bit(ifnum, &ps->ifclaimed);
> +     else
> +             warn("interface number %u out of range", ifnum);
> +

I would prefer a real WARN_ON() so that the imbedded people compiling
for size are not affected.

        Regards
                Oliver



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to