summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/packet/endpoint.go
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-01-15 15:47:13 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-15 15:49:15 -0800
commit12d9790833cc2f6a9b197066a5ecbeb434f74164 (patch)
treee9eec8e4c755c33c5a30c1912422b28380ed1f53 /pkg/tcpip/transport/packet/endpoint.go
parentf37ace6661dfed8acae7e22ed0eb9ad78bdeab34 (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/transport/packet/endpoint.go')
-rw-r--r--pkg/tcpip/transport/packet/endpoint.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/transport/packet/endpoint.go b/pkg/tcpip/transport/packet/endpoint.go
index c3b3b8d34..c0d6fb442 100644
--- a/pkg/tcpip/transport/packet/endpoint.go
+++ b/pkg/tcpip/transport/packet/endpoint.go
@@ -162,7 +162,7 @@ func (ep *endpoint) Close() {
func (ep *endpoint) ModerateRecvBuf(copied int) {}
// Read implements tcpip.Endpoint.Read.
-func (ep *endpoint) Read(dst io.Writer, count int, opts tcpip.ReadOptions) (tcpip.ReadResult, *tcpip.Error) {
+func (ep *endpoint) Read(dst io.Writer, opts tcpip.ReadOptions) (tcpip.ReadResult, *tcpip.Error) {
ep.rcvMu.Lock()
// If there's no data to read, return that read would block or that the
@@ -199,7 +199,7 @@ func (ep *endpoint) Read(dst io.Writer, count int, opts tcpip.ReadOptions) (tcpi
res.LinkPacketInfo = packet.packetInfo
}
- n, err := packet.data.ReadTo(dst, count, opts.Peek)
+ n, err := packet.data.ReadTo(dst, opts.Peek)
if n == 0 && err != nil {
return res, tcpip.ErrBadBuffer
}