From: Josef Weidendorfer Date: Wed, 26 Oct 2011 17:44:43 +0000 (+0000) Subject: Get rid of over-cautious check to make BEAM happy X-Git-Tag: svn/VALGRIND_3_8_0~605 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba9b09511bbe356735a2fc2ba6db38186ec29a85;p=thirdparty%2Fvalgrind.git Get rid of over-cautious check to make BEAM happy To play save, make an assertion out of it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12237 --- diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c index ad8caeb88c..1f76342bcf 100644 --- a/callgrind/bbcc.c +++ b/callgrind/bbcc.c @@ -811,10 +811,10 @@ void CLG_(setup_bbcc)(BB* bb) if (delayed_push && !skip) { if (CLG_(clo).skip_direct_recursion) { - /* do not increment rec. level if called from - * same function */ - if (!CLG_(current_state).bbcc || - (CLG_(current_state).bbcc->cxt->fn[0] != bbcc->cxt->fn[0])) + /* a call was detected, which means that the source BB != 0 */ + CLG_ASSERT(CLG_(current_state).bbcc != 0); + /* only increment rec. level if called from different function */ + if (CLG_(current_state).bbcc->cxt->fn[0] != bbcc->cxt->fn[0]) level++; } else level++;