> On Sep 24, 2020, at 07:43, Theo de Raadt <[email protected]> wrote:
>
> Mark Kettenis <[email protected]> wrote:
>
>>> Date: Thu, 24 Sep 2020 11:53:59 +0200
>>> From: Martin Pieuchot <[email protected]>
>>>
>>> Convert various "if (x) panic()" idioms into "KASSERT(!x)". The panic
>>> message isn't helping for such sanity checks and this help reducing the
>>> diff with NetBSD.
>>>
>>> ok?
>>
>> Yes, the KASSERTs are probably more useful for debugging. The
>> downside is that we lose the checks in RAMDISK kernels. The upside of
>> that is that it makes the kernel smaller.
>>
>> ok kettenis@
>
> That's the complete assessment of the situation, and on the scale I'm
> happy with the diff.
>
> ok deraadt
Is there any scenario where
if (condition)
panic();
is preferable to
KASSERT(condition);
outside of function calls with side effects?