From 073e240233589933c43143c997247c33206bb066 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 9 Nov 2009 21:13:17 -0800 Subject: - replaced gofmt expression formatting algorithm with rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036 --- src/pkg/gob/decode.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pkg/gob/decode.go') diff --git a/src/pkg/gob/decode.go b/src/pkg/gob/decode.go index 2d1331885..a9cdbe684 100644 --- a/src/pkg/gob/decode.go +++ b/src/pkg/gob/decode.go @@ -111,9 +111,9 @@ func decodeInt(state *decodeState) int64 { return 0 } if x&1 != 0 { - return ^int64(x>>1) + return ^int64(x >> 1) } - return int64(x>>1); + return int64(x >> 1); } type decOp func(i *decInstr, state *decodeState, p unsafe.Pointer) @@ -279,7 +279,7 @@ func floatFromBits(u uint64) float64 { var v uint64; for i := 0; i < 8; i++ { v <<= 8; - v |= u&0xFF; + v |= u & 0xFF; u >>= 8; } return math.Float64frombits(v); @@ -476,7 +476,7 @@ func decodeSlice(atyp *reflect.SliceType, state *decodeState, p uintptr, elemOp p = *(*uintptr)(up); } // Allocate storage for the slice elements, that is, the underlying array. - data := make([]byte, length * atyp.Elem().Size()); + data := make([]byte, length*atyp.Elem().Size()); // Always write a header at p. hdrp := (*reflect.SliceHeader)(unsafe.Pointer(p)); hdrp.Data = uintptr(unsafe.Pointer(&data[0])); -- cgit v1.2.3