summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/syscall/syscall_darwin.go')
-rw-r--r--src/pkg/syscall/syscall_darwin.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/syscall/syscall_darwin.go b/src/pkg/syscall/syscall_darwin.go
index 2663c7092..b2e6de7b6 100644
--- a/src/pkg/syscall/syscall_darwin.go
+++ b/src/pkg/syscall/syscall_darwin.go
@@ -94,13 +94,13 @@ func (w WaitStatus) ExitStatus() int {
if w&mask != exited {
return -1
}
- return int(w>>shift);
+ return int(w >> shift);
}
func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
func (w WaitStatus) Signal() int {
- sig := int(w&mask);
+ sig := int(w & mask);
if sig == stopped || sig == 0 {
return -1
}
@@ -117,7 +117,7 @@ func (w WaitStatus) StopSignal() int {
if !w.Stopped() {
return -1
}
- return int(w>>shift)&0xFF;
+ return int(w>>shift) & 0xFF;
}
func (w WaitStatus) TrapCause() int {
@@ -220,7 +220,7 @@ func (sa *SockaddrUnix) sockaddr() (uintptr, _Socklen, int) {
if n >= len(sa.raw.Path) || n == 0 {
return 0, 0, EINVAL
}
- sa.raw.Len = byte(3+n); // 2 for Family, Len; 1 for NUL
+ sa.raw.Len = byte(3 + n); // 2 for Family, Len; 1 for NUL
sa.raw.Family = AF_UNIX;
for i := 0; i < n; i++ {
sa.raw.Path[i] = int8(name[i])
@@ -236,7 +236,7 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, int) {
return nil, EINVAL
}
sa := new(SockaddrUnix);
- n := int(pp.Len)-3; // subtract leading Family, Len, terminating NUL
+ n := int(pp.Len) - 3; // subtract leading Family, Len, terminating NUL
for i := 0; i < n; i++ {
if pp.Path[i] == 0 {
// found early NUL; assume Len is overestimating
@@ -392,7 +392,7 @@ func nametomib(name string) (mib []_C_int, errno int) {
// will silently write 2 words farther than we specify
// and we'll get memory corruption.
var buf [CTL_MAXNAME + 2]_C_int;
- n := uintptr(CTL_MAXNAME)*siz;
+ n := uintptr(CTL_MAXNAME) * siz;
p := (*byte)(unsafe.Pointer(&buf[0]));
bytes := StringByteSlice(name);