Date: Wed, 18 Apr 2012 14:22:56 +1200 From: Andrew Thompson <thompsa@FreeBSD.org> To: Peter Jeremy <peterjeremy@acm.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234403 - head/sys/net Message-ID: <CAFAOGNT5a_mLP%2B0TTBbWV0mJpEgK2eCicNxmrxi8BQUgr8BWZg@mail.gmail.com> In-Reply-To: <20120418021614.GA37269@server.vk2pj.dyndns.org> References: <201204180139.q3I1dEPZ008424@svn.freebsd.org> <20120418021614.GA37269@server.vk2pj.dyndns.org>
index | next in thread | previous in thread | raw e-mail
On 18 April 2012 14:16, Peter Jeremy <peterjeremy@acm.org> wrote: > On 2012-Apr-18 01:39:14 +0000, Andrew Thompson <thompsa@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). Andrewhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFAOGNT5a_mLP%2B0TTBbWV0mJpEgK2eCicNxmrxi8BQUgr8BWZg>
