aboutsummaryrefslogtreecommitdiff
path: root/src/net/interface_bsd.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2016-04-14 19:09:36 -0700
committerMatthew Dempsky <mdempsky@google.com>2016-04-15 07:31:45 +0000
commit0da4dbe2322eb3b6224df35ce3e9fc83f104762b (patch)
tree264b8c9e959b16d9b3754996414b948ee6166cd7 /src/net/interface_bsd.go
parent80e7dddffafa6c5eb8e98d642b87546eb8e445ab (diff)
downloadgo-0da4dbe2322eb3b6224df35ce3e9fc83f104762b.tar.xz
all: remove unnecessary type conversions
cmd and runtime were handled separately, and I'm intentionally skipped syscall. This is the rest of the standard library. CL generated mechanically with github.com/mdempsky/unconvert. Change-Id: I9e0eff886974dedc37adb93f602064b83e469122 Reviewed-on: https://go-review.googlesource.com/22104 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/interface_bsd.go')
-rw-r--r--src/net/interface_bsd.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/interface_bsd.go b/src/net/interface_bsd.go
index b173fbcefc..17c6dd3dcd 100644
--- a/src/net/interface_bsd.go
+++ b/src/net/interface_bsd.go
@@ -61,13 +61,13 @@ func newLink(m *syscall.InterfaceMessage) (*Interface, error) {
m.Data = m.Data[unsafe.Offsetof(sa.Data):]
var name [syscall.IFNAMSIZ]byte
for i := 0; i < int(sa.Nlen); i++ {
- name[i] = byte(m.Data[i])
+ name[i] = m.Data[i]
}
ifi.Name = string(name[:sa.Nlen])
ifi.MTU = int(m.Header.Data.Mtu)
addr := make([]byte, sa.Alen)
for i := 0; i < int(sa.Alen); i++ {
- addr[i] = byte(m.Data[int(sa.Nlen)+i])
+ addr[i] = m.Data[int(sa.Nlen)+i]
}
ifi.HardwareAddr = addr[:sa.Alen]
}