summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/rawfile/rawfile_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-27 12:25:10 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-27 12:26:32 -0700
commit55f0c3316af8ea2a1fcc16511efc580f307623f6 (patch)
tree61a0a140fe4d43280fc04e4b50cfb7ade056912a /pkg/tcpip/link/rawfile/rawfile_unsafe.go
parent292f3f99b73fb901ffdd3ad8ac682718e1e8960a (diff)
Automated rollback of changelist 308163542
PiperOrigin-RevId: 308674219
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)),
},
{