Skip to content

Commit

Permalink
fuzz: fix redeclaration (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman authored Aug 29, 2022
1 parent 78905e8 commit 6f8ccba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,23 +258,23 @@ func fuzzBinaryOp(data []byte) int {
return 1
}

func bigMulMod(b1, b2, b3, b4 *big.Int) *big.Int {
func bigintMulMod(b1, b2, b3, b4 *big.Int) *big.Int {
return b1.Mod(big.NewInt(0).Mul(b2, b3), b4)
}

func intMulMod(f1, f2, f3, f4 *Int) *Int {
return f1.MulMod(f2, f3, f4)
}

func bigAddMod(b1, b2, b3, b4 *big.Int) *big.Int {
func bigintAddMod(b1, b2, b3, b4 *big.Int) *big.Int {
return b1.Mod(big.NewInt(0).Add(b2, b3), b4)
}

func intAddMod(f1, f2, f3, f4 *Int) *Int {
return f1.AddMod(f2, f3, f4)
}

func bigMulDiv(b1, b2, b3, b4 *big.Int) *big.Int {
func bigintMulDiv(b1, b2, b3, b4 *big.Int) *big.Int {
b1.Mul(b2, b3)
return b1.Div(b1, b4)
}
Expand All @@ -294,13 +294,13 @@ func fuzzTernaryOp(data []byte) int {
}

{ // mulMod
checkThreeArgOp(intMulMod, bigMulMod, x, y, z)
checkThreeArgOp(intMulMod, bigintMulMod, x, y, z)
}
{ // addMod
checkThreeArgOp(intAddMod, bigAddMod, x, y, z)
checkThreeArgOp(intAddMod, bigintAddMod, x, y, z)
}
{ // mulDiv
checkThreeArgOp(intMulDiv, bigMulDiv, x, y, z)
checkThreeArgOp(intMulDiv, bigintMulDiv, x, y, z)
}
return 1
}

0 comments on commit 6f8ccba

Please sign in to comment.