From 0a364330a2abba1fede96c7cdd6432f3007866b3 Mon Sep 17 00:00:00 2001 From: smasher164 Date: Mon, 27 Apr 2020 13:23:24 -0400 Subject: [PATCH] strconv: remove redundant conversions to int IntSize is an untyped constant that does not need explicit conversion. Annotating IntSize as an int and running github.com/mdempsky/unconvert reveals these two cases. Fixes #38682. Change-Id: I014646b7457ddcde32474810153229dcf0c269c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/230306 Run-TryBot: Akhil Indurti TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/strconv/atoi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strconv/atoi.go b/src/strconv/atoi.go index a4a8a37fb4..0b82fb0908 100644 --- a/src/strconv/atoi.go +++ b/src/strconv/atoi.go @@ -96,7 +96,7 @@ func ParseUint(s string, base int, bitSize int) (uint64, error) { } if bitSize == 0 { - bitSize = int(IntSize) + bitSize = IntSize } else if bitSize < 0 || bitSize > 64 { return 0, bitSizeError(fnParseUint, s0, bitSize) } @@ -203,7 +203,7 @@ func ParseInt(s string, base int, bitSize int) (i int64, err error) { } if bitSize == 0 { - bitSize = int(IntSize) + bitSize = IntSize } cutoff := uint64(1 << uint(bitSize-1)) -- 2.50.0