diff options
author | Tamir Duberstein <tamird@google.com> | 2021-01-15 15:47:13 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-15 15:49:15 -0800 |
commit | 12d9790833cc2f6a9b197066a5ecbeb434f74164 (patch) | |
tree | e9eec8e4c755c33c5a30c1912422b28380ed1f53 /pkg/tcpip/adapters/gonet | |
parent | f37ace6661dfed8acae7e22ed0eb9ad78bdeab34 (diff) |
Remove count argument from tcpip.Endpoint.Read
The same intent can be specified via the io.Writer.
PiperOrigin-RevId: 352098747
Diffstat (limited to 'pkg/tcpip/adapters/gonet')
-rw-r--r-- | pkg/tcpip/adapters/gonet/gonet.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/adapters/gonet/gonet.go b/pkg/tcpip/adapters/gonet/gonet.go index 85a0b8b90..fdeec12d3 100644 --- a/pkg/tcpip/adapters/gonet/gonet.go +++ b/pkg/tcpip/adapters/gonet/gonet.go @@ -295,7 +295,7 @@ func commonRead(b []byte, ep tcpip.Endpoint, wq *waiter.Queue, deadline <-chan s w := tcpip.SliceWriter(b) opts := tcpip.ReadOptions{NeedRemoteAddr: addr != nil} - res, err := ep.Read(&w, len(b), opts) + res, err := ep.Read(&w, opts) if err == tcpip.ErrWouldBlock { // Create wait queue entry that notifies a channel. @@ -303,7 +303,7 @@ func commonRead(b []byte, ep tcpip.Endpoint, wq *waiter.Queue, deadline <-chan s wq.EventRegister(&waitEntry, waiter.EventIn) defer wq.EventUnregister(&waitEntry) for { - res, err = ep.Read(&w, len(b), opts) + res, err = ep.Read(&w, opts) if err != tcpip.ErrWouldBlock { break } |