Skip to content

Commit 4c854b7

Browse files
mohansonJorropo
authored andcommitted
crypto/elliptic: change a variable name that have the same name as keywords
Change the variable name from byte to b, and use range over int to simplify the loop. Change-Id: I8855053c26ce798311f12505cd5edf21d7caf1f5 GitHub-Last-Rev: 70c8054 GitHub-Pull-Request: #74736 Reviewed-on: https://go-review.googlesource.com/c/go/+/690135 Reviewed-by: qiu laidongfeng <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent b10eb1d commit 4c854b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/crypto/elliptic/params.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ func (curve *CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.
295295
Bz := new(big.Int).SetInt64(1)
296296
x, y, z := new(big.Int), new(big.Int), new(big.Int)
297297

298-
for _, byte := range k {
299-
for bitNum := 0; bitNum < 8; bitNum++ {
298+
for _, b := range k {
299+
for range 8 {
300300
x, y, z = curve.doubleJacobian(x, y, z)
301-
if byte&0x80 == 0x80 {
301+
if b&0x80 == 0x80 {
302302
x, y, z = curve.addJacobian(Bx, By, Bz, x, y, z)
303303
}
304-
byte <<= 1
304+
b <<= 1
305305
}
306306
}
307307

0 commit comments

Comments
 (0)