summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/rawfile/rawfile_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-27 19:30:05 +0000
committergVisor bot <gvisor-bot@google.com>2020-04-27 19:30:05 +0000
commit78ea854d8b4053e084a87298f0d3f99ac1684473 (patch)
treef2c17744543bfb81ea8b3df199941a3b3082c063 /pkg/tcpip/link/rawfile/rawfile_unsafe.go
parent423dc64b50359fac50ecce08d7a2815ed4607da2 (diff)
parent55f0c3316af8ea2a1fcc16511efc580f307623f6 (diff)
Merge release-20200323.0-253-g55f0c33 (automated)
Diffstat (limited to 'pkg/tcpip/link/rawfile/rawfile_unsafe.go')
-rw-r--r--pkg/tcpip/link/rawfile/rawfile_unsafe.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/tcpip/link/rawfile/rawfile_unsafe.go b/pkg/tcpip/link/rawfile/rawfile_unsafe.go
index 92efd0bf8..44e25d475 100644
--- a/pkg/tcpip/link/rawfile/rawfile_unsafe.go
+++ b/pkg/tcpip/link/rawfile/rawfile_unsafe.go
@@ -76,13 +76,9 @@ func NonBlockingWrite3(fd int, b1, b2, b3 []byte) *tcpip.Error {
// We have two buffers. Build the iovec that represents them and issue
// a writev syscall.
- var base *byte
- if len(b1) > 0 {
- base = &b1[0]
- }
iovec := [3]syscall.Iovec{
{
- Base: base,
+ Base: &b1[0],
Len: uint64(len(b1)),
},
{