From 15f16706fb93a0720decd175ad2147be96a8e1e4 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Sun, 14 Mar 2021 13:19:12 +0800 Subject: [PATCH] internal/poll: eliminate the redundant type conversions of FD.Sysfd Change-Id: Ib75662f717320510319c696520e645f54eec97f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/301569 Reviewed-by: Emmanuel Odeke Reviewed-by: Ian Lance Taylor --- src/internal/poll/sendfile_bsd.go | 2 +- src/internal/poll/sendfile_linux.go | 2 +- src/internal/poll/sendfile_solaris.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/poll/sendfile_bsd.go b/src/internal/poll/sendfile_bsd.go index 9eda85882ca..3ba30a2154c 100644 --- a/src/internal/poll/sendfile_bsd.go +++ b/src/internal/poll/sendfile_bsd.go @@ -23,7 +23,7 @@ func SendFile(dstFD *FD, src int, pos, remain int64) (int64, error) { return 0, err } - dst := int(dstFD.Sysfd) + dst := dstFD.Sysfd var written int64 var err error for remain > 0 { diff --git a/src/internal/poll/sendfile_linux.go b/src/internal/poll/sendfile_linux.go index d6442e86664..6e7852347b7 100644 --- a/src/internal/poll/sendfile_linux.go +++ b/src/internal/poll/sendfile_linux.go @@ -20,7 +20,7 @@ func SendFile(dstFD *FD, src int, remain int64) (int64, error) { return 0, err } - dst := int(dstFD.Sysfd) + dst := dstFD.Sysfd var written int64 var err error for remain > 0 { diff --git a/src/internal/poll/sendfile_solaris.go b/src/internal/poll/sendfile_solaris.go index 748c85131e6..0a884307bb1 100644 --- a/src/internal/poll/sendfile_solaris.go +++ b/src/internal/poll/sendfile_solaris.go @@ -24,7 +24,7 @@ func SendFile(dstFD *FD, src int, pos, remain int64) (int64, error) { return 0, err } - dst := int(dstFD.Sysfd) + dst := dstFD.Sysfd var written int64 var err error for remain > 0 {