summaryrefslogtreecommitdiff
path: root/src/pkg/gob/decode.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2009-11-09 21:13:17 -0800
committerRobert Griesemer <gri@golang.org>2009-11-09 21:13:17 -0800
commit073e240233589933c43143c997247c33206bb066 (patch)
treee6953aa6ac9f97ad730c7509a39cf15d82131fab /src/pkg/gob/decode.go
parentef50a171462c00444b6bf8d205ae8e97079ab2b9 (diff)
downloadgolang-073e240233589933c43143c997247c33206bb066.tar.gz
- 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
Diffstat (limited to 'src/pkg/gob/decode.go')
-rw-r--r--src/pkg/gob/decode.go8
1 files changed, 4 insertions, 4 deletions
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]));