summary refs log tree commit diff
path: root/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/copy.c b/copy.c
index 55c31b2..4432986 100644
--- a/copy.c
+++ b/copy.c
@@ -121,7 +121,7 @@ copy(Fn *fn)
 	for (b=fn->start; b; b=b->link) {
 		for (p=b->phi; p; p=p->link)
 			visitphi(p, cp, &pw);
-		for (i=b->ins; i-b->ins < b->nins; i++)
+		for (i=b->ins; i<&b->ins[b->nins]; i++)
 			visitins(i, cp, &pw, fn);
 	}
 	while ((w1=w)) {
@@ -155,7 +155,7 @@ copy(Fn *fn)
 				subst(&p->arg[a], cp);
 			pp=&p->link;
 		}
-		for (i=b->ins; i-b->ins < b->nins; i++) {
+		for (i=b->ins; i<&b->ins[b->nins]; i++) {
 			r = copyof(i->to, cp);
 			if (!req(r, i->to)) {
 				*i = (Ins){.op = Onop};