aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorAndy Pan <panjf2000@gmail.com>2021-03-14 13:19:12 +0800
committerIan Lance Taylor <iant@golang.org>2021-03-16 01:40:41 +0000
commit15f16706fb93a0720decd175ad2147be96a8e1e4 (patch)
tree267bccb73ab578a6f1aca9371a4e3d8aef853898 /src/internal
parent78f90152364d68268a14b2907ae26379f314baf4 (diff)
downloadgo-15f16706fb93a0720decd175ad2147be96a8e1e4.tar.gz
go-15f16706fb93a0720decd175ad2147be96a8e1e4.zip
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 <emmanuel@orijtech.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/poll/sendfile_bsd.go2
-rw-r--r--src/internal/poll/sendfile_linux.go2
-rw-r--r--src/internal/poll/sendfile_solaris.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/poll/sendfile_bsd.go b/src/internal/poll/sendfile_bsd.go
index 9eda85882c..3ba30a2154 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 d6442e8666..6e7852347b 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 748c85131e..0a884307bb 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 {