all: simplify nested complexity and if blocks ending with a return statement (#21854)
Changes: Simplify nested complexity If an if blocks ends with a return statement then remove the else nesting. Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
This commit is contained in:
@ -287,9 +287,8 @@ func (g *G2) Add(r, p1, p2 *PointG2) *PointG2 {
|
||||
if t[1].equal(t[3]) {
|
||||
if t[0].equal(t[2]) {
|
||||
return g.Double(r, p1)
|
||||
} else {
|
||||
return r.Zero()
|
||||
}
|
||||
return r.Zero()
|
||||
}
|
||||
g.f.sub(t[1], t[1], t[3])
|
||||
g.f.double(t[4], t[1])
|
||||
|
Reference in New Issue
Block a user