From: David G. Andersen Date: Fri, 21 Sep 2012 19:53:57 +0000 (+1000) Subject: [release-branch.go1] math/big: Remove unnecessary test from nat.go multiplication X-Git-Tag: go1.0.3~172 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4b3a35b97969934bc6e6a9ecfedd01a2662ab08c;p=gostls13.git [release-branch.go1] math/big: Remove unnecessary test from nat.go multiplication ««« backport c533f48701cb math/big: Remove unnecessary test from nat.go multiplication The switch at the beginning of the function already ensures n > 1, so testing for n < 2 is redundant. R=golang-dev, gri CC=golang-dev https://golang.org/cl/6350051 »»» --- diff --git a/src/pkg/math/big/nat.go b/src/pkg/math/big/nat.go index eaa6ff0666..6d81823bb4 100644 --- a/src/pkg/math/big/nat.go +++ b/src/pkg/math/big/nat.go @@ -396,7 +396,7 @@ func (z nat) mul(x, y nat) nat { } // use basic multiplication if the numbers are small - if n < karatsubaThreshold || n < 2 { + if n < karatsubaThreshold { z = z.make(m + n) basicMul(z, x, y) return z.norm()