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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/callgrind/bbcc.c b/callgrind/bbcc.c
index ad8caeb..1f76342 100644
--- a/callgrind/bbcc.c
+++ b/callgrind/bbcc.c
@@ -811,10 +811,10 @@
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++;