Index: src/pkg/net/sockoptip_bsd.go |
=================================================================== |
--- a/src/pkg/net/sockoptip_bsd.go |
+++ b/src/pkg/net/sockoptip_bsd.go |
@@ -6,15 +6,12 @@ |
package net |
-import ( |
- "os" |
- "syscall" |
-) |
+import "syscall" |
func setIPv4MulticastInterface(fd *netFD, ifi *Interface) error { |
ip, err := interfaceToIPv4Addr(ifi) |
if err != nil { |
- return os.NewSyscallError("setsockopt", err) |
+ return err |
} |
var a [4]byte |
copy(a[:], ip.To4()) |
@@ -22,7 +19,7 @@ |
return err |
} |
defer fd.decref() |
- return os.NewSyscallError("setsockopt", syscall.SetsockoptInet4Addr(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_IF, a)) |
+ return syscall.SetsockoptInet4Addr(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_IF, a) |
} |
func setIPv4MulticastLoopback(fd *netFD, v bool) error { |
@@ -30,5 +27,5 @@ |
return err |
} |
defer fd.decref() |
- return os.NewSyscallError("setsockopt", syscall.SetsockoptByte(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_LOOP, byte(boolint(v)))) |
+ return syscall.SetsockoptByte(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_LOOP, byte(boolint(v))) |
} |