]> Cypherpunks.ru repositories - gostls13.git/commit
io: ReadAll: do not check for realloc in first round
authorOlivier Mengué <olivier.mengue@gmail.com>
Tue, 18 Apr 2023 20:13:27 +0000 (22:13 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 20 Apr 2023 16:22:09 +0000 (16:22 +0000)
commit0d699b6cb3e6be63846bbbee8cc7bcbfd6cb9500
treeb6e2f0f8f926429dfdac36a10a2431d2d04952ef
parent466e6dae9570ac88ef15c5f1bda9a59d7253cfee
io: ReadAll: do not check for realloc in first round

Refactor io.ReadAll to check for realloc of the buffer only after the
first read.

Fixes: #59702
Change-Id: I93b99139e6756f21738d47e7d9ad08e1d167258e
Reviewed-on: https://go-review.googlesource.com/c/go/+/486236
Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
src/io/io.go