|
From: <sv...@va...> - 2011-10-26 17:49:28
|
Author: weidendo
Date: 2011-10-26 18:44:43 +0100 (Wed, 26 Oct 2011)
New Revision: 12237
Log:
Get rid of over-cautious check to make BEAM happy
To play save, make an assertion out of it.
Modified:
trunk/callgrind/bbcc.c
Modified: trunk/callgrind/bbcc.c
===================================================================
--- trunk/callgrind/bbcc.c 2011-10-26 15:29:52 UTC (rev 12236)
+++ trunk/callgrind/bbcc.c 2011-10-26 17:44:43 UTC (rev 12237)
@@ -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++;
|