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 <austin@google.com>
diff --git a/src/liblink/sym.c b/src/liblink/sym.c
index bd85518..e068371 100644
--- a/src/liblink/sym.c
+++ b/src/liblink/sym.c
@@ -57,7 +57,6 @@
{"solaris", Hsolaris},
{"windows", Hwindows},
{"windowsgui", Hwindows},
- {0, 0},
};
int
@@ -65,7 +64,7 @@
{
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 @@
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);