Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Unified Diff: src/pkg/net/sockoptip_bsd.go

Issue 84750043: code review 84750043: net: drop unnecessary nested error notifications (Closed)
Patch Set: diff -r 88b3b2fa4dde http://code.google.com/p/go Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)))
}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b