Passes toolstash-check -all.
Change-Id: I1c85a2c0390517f4e9cdbddddbf3c353edca65b3
Reviewed-on: https://go-review.googlesource.com/64051
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}
}
func elf64writehdr() uint32 {
- for i := 0; i < EI_NIDENT; i++ {
- Cput(ehdr.ident[i])
- }
+ Cwrite(ehdr.ident[:])
Thearch.Wput(ehdr.type_)
Thearch.Wput(ehdr.machine)
Thearch.Lput(ehdr.version)
}
func elf32writehdr() uint32 {
- for i := 0; i < EI_NIDENT; i++ {
- Cput(ehdr.ident[i])
- }
+ Cwrite(ehdr.ident[:])
Thearch.Wput(ehdr.type_)
Thearch.Wput(ehdr.machine)
Thearch.Lput(ehdr.version)
Lputb(uint32(addr))
Cput(uint8(t + 0x80)) /* 0x80 is variable length */
- var i int
- for i = 0; i < len(s); i++ {
- Cput(s[i])
- }
+ Cwritestring(s)
Cput(0)
- Symsize += int32(l) + 1 + int32(i) + 1
+ Symsize += int32(l) + 1 + int32(len(s)) + 1
default:
return
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}
}
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}
}
sym := ctxt.Syms.Lookup("pclntab", 0)
if sym != nil {
ld.Lcsize = int32(len(sym.P))
- for i := 0; int32(i) < ld.Lcsize; i++ {
- ld.Cput(sym.P[i])
- }
-
+ ld.Cwrite(sym.P)
ld.Cflush()
}