Skip to content

Commit 617fbc8

Browse files
committed
ipv6: rename freebsd32o64 with compatFreeBSD32 for consistency
The variable name compatFreeBSD32 refers to the kernel configuration directive COMPAT_FREEBSD32 and is also used in route and ipv6 packages. Change-Id: I00e6de390c25b7df45b76e772719a83fa6b0843b Reviewed-on: https://go-review.googlesource.com/c/149879 Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 parent 1ea17d6 commit 617fbc8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: ipv6/sys_freebsd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func init() {
5151
archs, _ := syscall.Sysctl("kern.supported_archs")
5252
for _, s := range strings.Fields(archs) {
5353
if s == "amd64" {
54-
freebsd32o64 = true
54+
compatFreeBSD32 = true
5555
break
5656
}
5757
}

Diff for: ipv6/sys_ssmreq.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"golang.org/x/net/internal/socket"
1414
)
1515

16-
var freebsd32o64 bool
16+
var compatFreeBSD32 bool // 386 emulation on amd64
1717

1818
func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
1919
var gr groupReq
@@ -22,7 +22,7 @@ func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) e
2222
}
2323
gr.setGroup(grp)
2424
var b []byte
25-
if freebsd32o64 {
25+
if compatFreeBSD32 {
2626
var d [sizeofGroupReq + 4]byte
2727
s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
2828
copy(d[:4], s[:4])
@@ -41,7 +41,7 @@ func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, sr
4141
}
4242
gsr.setSourceGroup(grp, src)
4343
var b []byte
44-
if freebsd32o64 {
44+
if compatFreeBSD32 {
4545
var d [sizeofGroupSourceReq + 4]byte
4646
s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
4747
copy(d[:4], s[:4])

0 commit comments

Comments
 (0)