diff options
author | Matthew Dempsky <mdempsky@google.com> | 2016-04-14 19:09:36 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2016-04-15 07:31:45 +0000 |
commit | 0da4dbe2322eb3b6224df35ce3e9fc83f104762b (patch) | |
tree | 264b8c9e959b16d9b3754996414b948ee6166cd7 /src/encoding/asn1 | |
parent | 80e7dddffafa6c5eb8e98d642b87546eb8e445ab (diff) | |
download | go-0da4dbe2322eb3b6224df35ce3e9fc83f104762b.tar.gz go-0da4dbe2322eb3b6224df35ce3e9fc83f104762b.zip |
all: remove unnecessary type conversions
cmd and runtime were handled separately, and I'm intentionally skipped
syscall. This is the rest of the standard library.
CL generated mechanically with github.com/mdempsky/unconvert.
Change-Id: I9e0eff886974dedc37adb93f602064b83e469122
Reviewed-on: https://go-review.googlesource.com/22104
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/asn1')
-rw-r--r-- | src/encoding/asn1/marshal.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoding/asn1/marshal.go b/src/encoding/asn1/marshal.go index 2b796c4e75..30797ef099 100644 --- a/src/encoding/asn1/marshal.go +++ b/src/encoding/asn1/marshal.go @@ -315,9 +315,9 @@ func marshalUTCTime(out *forkableWriter, t time.Time) (err error) { switch { case 1950 <= year && year < 2000: - err = marshalTwoDigits(out, int(year-1900)) + err = marshalTwoDigits(out, year-1900) case 2000 <= year && year < 2050: - err = marshalTwoDigits(out, int(year-2000)) + err = marshalTwoDigits(out, year-2000) default: return StructuralError{"cannot represent time as UTCTime"} } @@ -435,7 +435,7 @@ func marshalBody(out *forkableWriter, value reflect.Value, params fieldParameter return out.WriteByte(0) } case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return marshalInt64(out, int64(v.Int())) + return marshalInt64(out, v.Int()) case reflect.Struct: t := v.Type() |