diff options
| author | Daniel Müllner <muellner@google.com> | 2026-01-19 09:18:05 +0100 |
|---|---|---|
| committer | Carlos Amedee <carlos@golang.org> | 2026-01-20 10:18:00 -0800 |
| commit | 4edaaf2b529219ff219798914f730ca5a0ab018b (patch) | |
| tree | 72115c83d0e0711ac37ac5d7f37e686ad9b4eda9 | |
| parent | 7251c9e0f00a6d7d37bb441f3e823c160131e9b5 (diff) | |
| download | go-4edaaf2b529219ff219798914f730ca5a0ab018b.tar.xz | |
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 <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Florian Lehner <lehner.florian86@gmail.com>
| -rw-r--r-- | src/strconv/number.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
