Miscellaneous small cleanups (#2291)

This commit is contained in:
dfawley
2018-09-04 15:11:50 -07:00
committed by GitHub
parent 826807ed07
commit ccd64cfcfa
2 changed files with 1 additions and 3 deletions

View File

@ -50,5 +50,4 @@ func (s *SocketOptionData) Getsockopt(fd uintptr) {
if v, err := unix.GetsockoptTCPInfo(int(fd), syscall.SOL_TCP, syscall.TCP_INFO); err == nil {
s.TCPInfo = v
}
return
}

View File

@ -56,8 +56,7 @@ func TestGetSocketOpt(t *testing.T) {
recvTimout := &unix.Timeval{Sec: 100}
sendTimeout := &unix.Timeval{Sec: 8888}
raw.Control(func(fd uintptr) {
var err error
err = unix.SetsockoptLinger(int(fd), syscall.SOL_SOCKET, syscall.SO_LINGER, l)
err := unix.SetsockoptLinger(int(fd), syscall.SOL_SOCKET, syscall.SO_LINGER, l)
if err != nil {
t.Fatalf("failed to SetsockoptLinger(%v,%v,%v,%v) due to %v", int(fd), syscall.SOL_SOCKET, syscall.SO_LINGER, l, err)
}