RFC: Inverse KASSERT in sys/dev/usb/ohci.c:1.150 ?
Maxime Henrion
mux at freebsd.org
Wed Jan 5 05:28:00 PST 2005
Giorgos Keramidas wrote:
> The KASSERT that replaces an explicit if conditional in ohci.c:1.150
> causes a panic here when I try to use my USB flash disk:
>
> % -#ifdef DIAGNOSTIC
> % - if (curlen == 0)
> % - panic("ohci_alloc_std: curlen == 0");
> % -#endif
> % + KASSERT ((curlen == 0), ("ohci_alloc_std: curlen == 0"));
>
> Shouldn't the KASSERT expression have inverse logic, i.e.:
>
> KASSERT((curlen != 0), ("ohci_alloc_std: curlen == 0"));
Yes, it indeed should.
Cheers,
Maxime
More information about the freebsd-current
mailing list