Commits

Aram Hăvărneanu committed 149a92e

syscall: address jsing's points

Comments (0)

Files changed (2)

src/pkg/syscall/so_solaris.go

 	"unsafe"
 )
 
-// soError describes reasons for shared libraries load failures.
+// soError describes reasons for shared library load failures.
 type soError struct {
 	Err     error
 	ObjName string

src/pkg/syscall/syscall_solaris.go

 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
 	_, err := fcntl(int(fd), cmd, uintptr(unsafe.Pointer(lk)))
-	if err == nil {
-		return nil
-	}
 	return err
 }
 
 		pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
 		sa := new(SockaddrUnix)
 		// Assume path ends at NUL.
-		// This is not technically the Sunos semantics for
-		// abstract Unix domain sockets--they are supposed
-		// to be uninterpreted fixed-size binary blobs--but
+		// This is not technically the Solaris semantics for
+		// abstract Unix domain sockets -- they are supposed
+		// to be uninterpreted fixed-size binary blobs -- but
 		// everyone uses this convention.
 		n := 0
 		for n < len(pp.Path) && pp.Path[n] != 0 {
 	var ptr unsafe.Pointer
 	var salen _Socklen
 	if to != nil {
-		var err error
 		ptr, salen, err = to.sockaddr()
 		if err != nil {
 			return err
 	}
 	msg.Iov = &iov
 	msg.Iovlen = 1
-	if err = sendmsg(fd, &msg, flags); err != nil {
-		return
-	}
-	return
+	return sendmsg(fd, &msg, flags)
 }
 
 /*