From 3be0a0ef6fb80d099aefdba67b68df3b500188bc Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 12 Jan 2015 15:17:10 -0500 Subject: liblink: adjustments for c2go conversion Mostly this is using uint32 instead of int32 for unsigned values like instruction encodings or float32 bit representations, removal of ternary operations, and removal of #defines. Delete sched9.c, because it is not compiled (it is still in the history if we ever need it). Change-Id: I68579cfea679438a27a80416727a9af932b088ae Reviewed-on: https://go-review.googlesource.com/2658 Reviewed-by: Austin Clements --- src/liblink/sym.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/liblink/sym.c') diff --git a/src/liblink/sym.c b/src/liblink/sym.c index bd85518467..e06837118a 100644 --- a/src/liblink/sym.c +++ b/src/liblink/sym.c @@ -57,7 +57,6 @@ static struct { {"solaris", Hsolaris}, {"windows", Hwindows}, {"windowsgui", Hwindows}, - {0, 0}, }; int @@ -65,7 +64,7 @@ headtype(char *name) { int i; - for(i=0; headers[i].name; i++) + for(i=0; i < nelem(headers); i++) if(strcmp(name, headers[i].name) == 0) return headers[i].val; return -1; @@ -77,7 +76,7 @@ headstr(int v) static char buf[20]; int i; - for(i=0; headers[i].name; i++) + for(i=0; i < nelem(headers); i++) if(v == headers[i].val) return headers[i].name; snprint(buf, sizeof buf, "%d", v); -- cgit v1.3-5-g9baa