summary refs log tree commit diff
path: root/copy.c
diff options
context:
space:
mode:
authorEmil Skoeldberg <emil@skoeldberg.net>2018-04-26 18:11:55 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2018-04-26 22:49:36 +0200
commite7a387585992a9378ba2f2319c2408c62a0b14e8 (patch)
treef7d21d2165b8017f3a28a3452a0da716f8e34b87 /copy.c
parent39b1f468b09d94cac6ec65a8c0fbc210e3c9989e (diff)
downloadroux-e7a387585992a9378ba2f2319c2408c62a0b14e8.tar.gz
Fix compiler warnings.
Compiler warned about comparison between signed and unsigned values.
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};