mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
1fdeb6b58a
commit
175929b9fe
50 changed files with 175 additions and 178 deletions
|
|
@ -260,7 +260,7 @@ func initreorder(l *NodeList, out **NodeList) {
|
|||
// declarations and outputs the corresponding list of statements
|
||||
// to include in the init() function body.
|
||||
func initfix(l *NodeList) *NodeList {
|
||||
lout := (*NodeList)(nil)
|
||||
var lout *NodeList
|
||||
lno := int(lineno)
|
||||
initreorder(l, &lout)
|
||||
lineno = int32(lno)
|
||||
|
|
@ -772,7 +772,7 @@ func slicelit(ctxt int, n *Node, var_ *Node, init **NodeList) {
|
|||
|
||||
// if the literal contains constants,
|
||||
// make static initialized array (1),(2)
|
||||
vstat := (*Node)(nil)
|
||||
var vstat *Node
|
||||
|
||||
mode := getdyn(n, 1)
|
||||
if mode&MODECONST != 0 {
|
||||
|
|
@ -1011,9 +1011,9 @@ func maplit(ctxt int, n *Node, var_ *Node, init **NodeList) {
|
|||
}
|
||||
|
||||
// put in dynamic entries one-at-a-time
|
||||
key := (*Node)(nil)
|
||||
var key *Node
|
||||
|
||||
val := (*Node)(nil)
|
||||
var val *Node
|
||||
for l := n.List; l != nil; l = l.Next {
|
||||
r = l.N
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue