From: Andy Pan Date: Sun, 14 Mar 2021 05:19:12 +0000 (+0800) Subject: internal/poll: eliminate the redundant type conversions of FD.Sysfd X-Git-Tag: go1.17beta1~1111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=15f16706fb93a0720decd175ad2147be96a8e1e4;p=gostls13.git 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 --- 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 {