- replaced gofmt expression formatting algorithm with

rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)

R=rsc, r
http://go/go-review/1024041
This commit is contained in:
Robert Griesemer 2009-11-09 21:23:52 -08:00
parent baba292998
commit 3bb0032cd6
121 changed files with 750 additions and 750 deletions

View file

@ -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);