Re: RFC: Inverse KASSERT in sys/dev/usb/ohci.c:1.150 ?

[ Available lists | Index of freebsd-current | Month of Jan 2005 | Week of 5 Jan 2005 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Maxime Henrion <mux@freebsd.org>
Date
5 Jan 2005 13:28:00
Subject
Re: RFC: Inverse KASSERT in sys/dev/usb/ohci.c:1.150 ?
Message-ID
20050105132800.GE63028@elvis.mu.org

In reply to
References to

[ Hide this part ]
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


Elapsed time: 0.071 seconds