1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:04:46 -07:00

math/big: simplify bool expression

Change-Id: I280c53be455f2fe0474ad577c0f7b7908a4eccb2
Reviewed-on: https://go-review.googlesource.com/36993
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Daniel Martí 2017-02-14 15:52:44 +00:00 committed by Ian Lance Taylor
parent 72aa757ddd
commit 6910756f9b

View File

@ -570,7 +570,7 @@ func (z *Int) binaryGCD(a, b *Int) *Int {
// Rand sets z to a pseudo-random number in [0, n) and returns z.
func (z *Int) Rand(rnd *rand.Rand, n *Int) *Int {
z.neg = false
if n.neg == true || len(n.abs) == 0 {
if n.neg || len(n.abs) == 0 {
z.abs = nil
return z
}