Skip to content

Commit b18d3dd

Browse files
cuishuanggopherbot
authored andcommitted
secure/precis: replace bytes.Compare with bytes.Equal
Change-Id: Ifa6ba05253b38e1cb3d5791e62b36a523fb68e52 GitHub-Last-Rev: 2d7de01 GitHub-Pull-Request: #36 Reviewed-on: https://go-review.googlesource.com/c/text/+/438559 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
1 parent 795e854 commit b18d3dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

secure/precis/profile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func (p *Profile) Compare(a, b string) bool {
316316
return false
317317
}
318318

319-
return bytes.Compare(akey, bkey) == 0
319+
return bytes.Equal(akey, bkey)
320320
}
321321

322322
// Allowed returns a runes.Set containing every rune that is a member of the

0 commit comments

Comments
 (0)