From 56e375d053dd5a6b1ad01329d9a864b7053d0e08 Mon Sep 17 00:00:00 2001 From: Yves Junqueira Date: Sun, 25 Jul 2010 15:30:32 +0100 Subject: [PATCH] Fixing other potential problems related to redeclaring err within a inner block. Also changing harmless look-alike cases for style consistency --- parse.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parse.go b/parse.go index 3dcdacc..f9bbfaf 100644 --- a/parse.go +++ b/parse.go @@ -61,7 +61,8 @@ type Builder interface { func collectInt(r Reader, delim byte) (buf []byte, err os.Error) { for { - c, err := r.ReadByte() + var c byte + c, err = r.ReadByte() if err != nil { return } @@ -87,11 +88,11 @@ func decodeInt64(r Reader, delim byte) (data int64, err os.Error) { } func decodeString(r Reader) (data string, err os.Error) { - len, err := decodeInt64(r, ':') + length, err := decodeInt64(r, ':') if err != nil { return } - if len < 0 { + if length < 0 { err = os.NewError("Bad string length") return }