From: Daniel Müllner Date: Mon, 19 Jan 2026 08:18:05 +0000 (+0100) Subject: strconv: don't call internal Atoi twice in Atoi X-Git-Tag: go1.26rc3~11^2~2 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4edaaf2b529219ff219798914f730ca5a0ab018b;p=gostls13.git strconv: don't call internal Atoi twice in Atoi Change-Id: I89a41bbc83fdf473399527a933d57794ce83f68a Reviewed-on: https://go-review.googlesource.com/c/go/+/737261 Reviewed-by: Russ Cox LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Reviewed-by: Florian Lehner --- diff --git a/src/strconv/number.go b/src/strconv/number.go index 3fa625c35f..acaed1c96e 100644 --- a/src/strconv/number.go +++ b/src/strconv/number.go @@ -148,7 +148,7 @@ func Atoi(s string) (int, error) { if err != nil { return x, toError("Atoi", s, 0, 0, err) } - return strconv.Atoi(s) + return x, nil } // FormatComplex converts the complex number c to a string of the