svn commit: r234403 - head/sys/net

Andrew Thompson thompsa at FreeBSD.org
Wed Apr 18 02:22:57 UTC 2012


On 18 April 2012 14:16, Peter Jeremy <peterjeremy at acm.org> wrote:
> On 2012-Apr-18 01:39:14 +0000, Andrew Thompson <thompsa at FreeBSD.org> wrote:
>>Log:
>>  Remove KASSERTS, they do not add any value here since the pointer is about to
>>  be derefernced anyway.
>
> Could you give a bit more background to this commit.  You get a crash in
> both cases but the KASSERT() at least tells you which variable was NULL
> without needing to trawl through the crashdump to find what caused the
> NULL pointer dereference trap.

Out of the five linkstate function pointers in this block of code only
these two had a kassert so it was just about making it more
consistent. It is something that is not possible within the code
anyway (sans memory corruption).


Andrew


More information about the svn-src-all mailing list