internal: use constant to avoid repeated definitions
Change-Id: I7cf3114a66ac57b3c93ba04dfff6cf4adc7c93b2
GitHub-Last-Rev: eb1da5a48a44189ae1c8aa8245fe3616c9c51eaf
GitHub-Pull-Request: golang/debug#17
Reviewed-on: https://go-review.googlesource.com/c/debug/+/431557
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
diff --git a/internal/gocore/module.go b/internal/gocore/module.go
index 4f443c7..925138b 100644
--- a/internal/gocore/module.go
+++ b/internal/gocore/module.go
@@ -6,6 +6,7 @@
import (
"fmt"
+ "math"
"sort"
"golang.org/x/debug/internal/core"
@@ -266,7 +267,7 @@
}
func (t *pcTab) setEmpty() {
- t.entries = []pcTabEntry{{bytes: 1<<63 - 1, val: -1}}
+ t.entries = []pcTabEntry{{bytes: math.MaxInt64, val: -1}}
}
func (t *pcTab) find(off int64) (int64, error) {