internal: remove redundant type conversion
Change-Id: I2bbfcf04a5491fe8e66bd79f4e17836e5bfff489
GitHub-Last-Rev: dfca9b9c973901bde4a54d6d2bf95ad7abdad8b2
GitHub-Pull-Request: golang/debug#15
Reviewed-on: https://go-review.googlesource.com/c/debug/+/428936
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/core/process.go b/internal/core/process.go
index d4da13e..cc7328b 100644
--- a/internal/core/process.go
+++ b/internal/core/process.go
@@ -480,14 +480,14 @@
if m.f == nil {
m.f = f
- m.off = int64(off) + m.min.Sub(min)
+ m.off = off + m.min.Sub(min)
} else {
// Data is both in the core file and in a mapped file.
// The mapped file may be stale (even if it is readonly now,
// it may have been writeable at some point).
// Keep the file+offset just for printing.
m.origF = f
- m.origOff = int64(off) + m.min.Sub(min)
+ m.origOff = off + m.min.Sub(min)
}
}
}
diff --git a/internal/gocore/module.go b/internal/gocore/module.go
index c0a55af..5c22b63 100644
--- a/internal/gocore/module.go
+++ b/internal/gocore/module.go
@@ -105,7 +105,7 @@
var n uint32
if npcdata.typ.Kind == KindUint {
// In 1.16, pcsp changed to be a uint32 from an int32.
- n = uint32(npcdata.Uint32())
+ n = npcdata.Uint32()
} else {
n = uint32(npcdata.Int32())
}