No need to check operr before returning.
Change-Id: I64b849f7c102de01180823e3f0123d438ce7608a
Reviewed-on: https://go-review.googlesource.com/c/go/+/232797
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
if err != nil {
return n, err
}
- if operr != nil {
- return n, operr
- }
- return n, nil
+ return n, operr
}
func writeRawConn(c syscall.RawConn, b []byte) error {
if err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}
func controlRawConn(c syscall.RawConn, addr Addr) error {
if err := c.Control(fn); err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}
func controlOnConnSetup(network string, address string, c syscall.RawConn) error {
if err := c.Control(fn); err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}
if err != nil {
return n, err
}
- if operr != nil {
- return n, operr
- }
- return n, nil
+ return n, operr
}
func writeRawConn(c syscall.RawConn, b []byte) error {
if err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}
func controlRawConn(c syscall.RawConn, addr Addr) error {
if err := c.Control(fn); err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}
func controlOnConnSetup(network string, address string, c syscall.RawConn) error {
if err := c.Control(fn); err != nil {
return err
}
- if operr != nil {
- return operr
- }
- return nil
+ return operr
}