all: remove redundant type conversion

Change-Id: I37550b85567abd2f5b422e742fcea9b26fd80f2b
GitHub-Last-Rev: b2e840379d354a78cf2657de2f4961717b65a5da
GitHub-Pull-Request: golang/net#148
Reviewed-on: https://go-review.googlesource.com/c/net/+/428937
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/bpf/vm_instructions.go b/bpf/vm_instructions.go
index cf8947c..0aa307c 100644
--- a/bpf/vm_instructions.go
+++ b/bpf/vm_instructions.go
@@ -94,7 +94,7 @@
 
 func loadAbsolute(ins LoadAbsolute, in []byte) (uint32, bool) {
 	offset := int(ins.Off)
-	size := int(ins.Size)
+	size := ins.Size
 
 	return loadCommon(in, offset, size)
 }
@@ -121,7 +121,7 @@
 
 func loadIndirect(ins LoadIndirect, in []byte, regX uint32) (uint32, bool) {
 	offset := int(ins.Off) + int(regX)
-	size := int(ins.Size)
+	size := ins.Size
 
 	return loadCommon(in, offset, size)
 }
diff --git a/context/go17.go b/context/go17.go
index 0a54bdb..2cb9c40 100644
--- a/context/go17.go
+++ b/context/go17.go
@@ -32,7 +32,7 @@
 // call cancel as soon as the operations running in this Context complete.
 func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
 	ctx, f := context.WithCancel(parent)
-	return ctx, CancelFunc(f)
+	return ctx, f
 }
 
 // WithDeadline returns a copy of the parent context with the deadline adjusted
@@ -46,7 +46,7 @@
 // call cancel as soon as the operations running in this Context complete.
 func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
 	ctx, f := context.WithDeadline(parent, deadline)
-	return ctx, CancelFunc(f)
+	return ctx, f
 }
 
 // WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).