diff options
| author | guoguangwu <guoguangwug@gmail.com> | 2024-03-15 07:33:32 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-03-15 23:16:01 +0000 |
| commit | bedda245740d766bfad36b2d91a22781575fe463 (patch) | |
| tree | 9a1407c4ee1c927c1566b62db9dd8d49caed1cf0 /src/cmd/internal | |
| parent | 159144f28b7aa4edb45ce9fb23b22623b3ac047b (diff) | |
| download | go-bedda245740d766bfad36b2d91a22781575fe463.tar.xz | |
cmd/internal/obj: replace bytes.Index call with bytes.Contains
Change-Id: I6b30ac3e9d15c29197426fb16dc4031056f6bb10
GitHub-Last-Rev: e2dda286f26587726870a5779d6caa0c5abd6750
GitHub-Pull-Request: golang/go#66331
Reviewed-on: https://go-review.googlesource.com/c/go/+/571915
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/internal')
| -rw-r--r-- | src/cmd/internal/obj/x86/pcrelative_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/obj/x86/pcrelative_test.go b/src/cmd/internal/obj/x86/pcrelative_test.go index 3827100123..f92b43c72f 100644 --- a/src/cmd/internal/obj/x86/pcrelative_test.go +++ b/src/cmd/internal/obj/x86/pcrelative_test.go @@ -93,7 +93,7 @@ LOOP: data := bytes.Split(objout, []byte("\n")) for idx := len(data) - 1; idx >= 0; idx-- { // check that RET wasn't overwritten. - if bytes.Index(data[idx], []byte("RET")) != -1 { + if bytes.Contains(data[idx], []byte("RET")) { if testing.Short() { break LOOP } |
