From: Daniel Martí Date: Tue, 14 Feb 2017 15:52:44 +0000 (+0000) Subject: math/big: simplify bool expression X-Git-Tag: go1.9beta1~1557 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6910756f9b8c7a97b1435ec40b8ebff9655611d7;p=gostls13.git math/big: simplify bool expression Change-Id: I280c53be455f2fe0474ad577c0f7b7908a4eccb2 Reviewed-on: https://go-review.googlesource.com/36993 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- diff --git a/src/math/big/int.go b/src/math/big/int.go index bed8d60a5e..62f7fc5320 100644 --- a/src/math/big/int.go +++ b/src/math/big/int.go @@ -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 }