cmd/5g etc: mechanical cleanup
Run rsc.io/grind rev 796d0f2 on C->Go conversions.
This replaces various awkward := initializations with plain var declarations.
Checked bit-for-bit compatibility with toolstash + buildall.
Change-Id: I601101d8177894adb9b0e3fb55dfe0ed4f544716
Reviewed-on: https://go-review.googlesource.com/6517
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/internal/gc/subr.go b/src/cmd/internal/gc/subr.go
index 541e2a4..4bc26f2 100644
--- a/src/cmd/internal/gc/subr.go
+++ b/src/cmd/internal/gc/subr.go
@@ -2332,7 +2332,7 @@
var n *Node
var buf string
- args := (*NodeList)(nil)
+ var args *NodeList
gen := 0
for t := Structfirst(&savet, tl); t != nil; t = structnext(&savet) {
n = nil
@@ -2431,7 +2431,7 @@
funchdr(fn)
// arg list
- args := (*NodeList)(nil)
+ var args *NodeList
isddd := 0
for l := in; l != nil; l = l.Next {
@@ -2450,7 +2450,7 @@
// these strings are already in the reflect tables,
// so no space cost to use them here.
- l := (*NodeList)(nil)
+ var l *NodeList
var v Val
v.Ctype = CTSTR
@@ -2670,7 +2670,7 @@
// Walk the struct using memhash for runs of AMEM
// and calling specific hash functions for the others.
case TSTRUCT:
- first := (*Type)(nil)
+ var first *Type
offend := int64(0)
var size int64
@@ -2915,7 +2915,7 @@
// and calling specific equality tests for the others.
// Skip blank-named fields.
case TSTRUCT:
- first := (*Type)(nil)
+ var first *Type
offend := int64(0)
var size int64
@@ -3231,7 +3231,7 @@
}
func listtreecopy(l *NodeList) *NodeList {
- out := (*NodeList)(nil)
+ var out *NodeList
for ; l != nil; l = l.Next {
out = list(out, treecopy(l.N))
}