From 9aad19327eb719775a874f8f18bb15958db1d471 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 9 Nov 2009 21:23:52 -0800 Subject: - 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 --- src/pkg/patch/git.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pkg/patch/git.go') diff --git a/src/pkg/patch/git.go b/src/pkg/patch/git.go index f9335cc45..fd5d781a2 100644 --- a/src/pkg/patch/git.go +++ b/src/pkg/patch/git.go @@ -44,11 +44,11 @@ func (d *GITBinaryLiteral) Apply(old []byte) ([]byte, os.Error) { func unhex(c byte) uint8 { switch { case '0' <= c && c <= '9': - return c-'0' + return c - '0' case 'a' <= c && c <= 'f': - return c-'a'+10 + return c - 'a' + 10 case 'A' <= c && c <= 'F': - return c-'A'+10 + return c - 'A' + 10 } return 255; } @@ -61,7 +61,7 @@ func getHex(s []byte) (data []byte, rest []byte) { n &^= 1; // Only take an even number of hex digits. data = make([]byte, n/2); for i := range data { - data[i] = unhex(s[2*i])<<4 | unhex(s[2*i + 1]) + data[i] = unhex(s[2*i])<<4 | unhex(s[2*i+1]) } rest = s[n:len(s)]; return; -- cgit v1.2.3