mirror of
https://github.com/golang/net.git
synced 2026-03-31 02:17:08 +09:00
ipv4, ipv6: remove or move unused err* vars
errNoSuchInterface is only used in ipv4/sys_asmreq.go which is not built e.g. on Linux, so move it there. Change-Id: I18b2e2ec8f321db3df164dcc6a69b8c92e6ab68c Reviewed-on: https://go-review.googlesource.com/c/net/+/220097 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
16171245cf
commit
f229aea8fa
@@ -13,16 +13,13 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
errInvalidConn = errors.New("invalid connection")
|
||||
errMissingAddress = errors.New("missing address")
|
||||
errMissingHeader = errors.New("missing header")
|
||||
errNilHeader = errors.New("nil header")
|
||||
errHeaderTooShort = errors.New("header too short")
|
||||
errExtHeaderTooShort = errors.New("extension header too short")
|
||||
errInvalidConnType = errors.New("invalid conn type")
|
||||
errNoSuchInterface = errors.New("no such interface")
|
||||
errNoSuchMulticastInterface = errors.New("no such multicast interface")
|
||||
errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
|
||||
errInvalidConn = errors.New("invalid connection")
|
||||
errMissingAddress = errors.New("missing address")
|
||||
errNilHeader = errors.New("nil header")
|
||||
errHeaderTooShort = errors.New("header too short")
|
||||
errExtHeaderTooShort = errors.New("extension header too short")
|
||||
errInvalidConnType = errors.New("invalid conn type")
|
||||
errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
|
||||
|
||||
// See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html.
|
||||
freebsdVersion uint32
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
package ipv4
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/net/internal/socket"
|
||||
)
|
||||
|
||||
var errNoSuchInterface = errors.New("no such interface")
|
||||
|
||||
func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
|
||||
mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}}
|
||||
if err := setIPMreqInterface(&mreq, ifi); err != nil {
|
||||
|
||||
@@ -15,7 +15,6 @@ var (
|
||||
errMissingAddress = errors.New("missing address")
|
||||
errHeaderTooShort = errors.New("header too short")
|
||||
errInvalidConnType = errors.New("invalid conn type")
|
||||
errNoSuchInterface = errors.New("no such interface")
|
||||
errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user