]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Get rid of over-cautious check to make BEAM happy
authorJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Wed, 26 Oct 2011 17:44:43 +0000 (17:44 +0000)
committerJosef Weidendorfer <Josef.Weidendorfer@gmx.de>
Wed, 26 Oct 2011 17:44:43 +0000 (17:44 +0000)
To play save, make an assertion out of it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12237

callgrind/bbcc.c

index ad8caeb88c2f19e18887f116ada3fad1481e3f41..1f76342bcff4cdb09a7b3532e80599d9a9026a63 100644 (file)
@@ -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++;