develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33877 - trunk/compilers/imcc

From:
cotto
Date:
December 14, 2008 02:36
Subject:
[svn:parrot] r33877 - trunk/compilers/imcc
Message ID:
20081214103556.E99E7CBAC8@x12.develooper.com
Author: cotto
Date: Sun Dec 14 02:35:51 2008
New Revision: 33877

Modified:
   trunk/compilers/imcc/optimizer.c

Log:
[imcc] be a little more defensive in NULL checks (CID #336)


Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c	(original)
+++ trunk/compilers/imcc/optimizer.c	Sun Dec 14 02:35:51 2008
@@ -1511,7 +1511,7 @@
 
     /* Unreachable instructions */
 
-    for (last = unit->instructions, ins=last->next;
+    for (last = unit->instructions, last && (ins = last->next);
          last && ins;
          ins = ins->next) {
         if ((last->type & IF_goto) && !(ins->type & ITLABEL) &&



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About