pkg/vm/stack: fix S1008 gosimple warning from GolangCI

S1008: should use 'return ' instead of 'if { return }; return ' (from gosimple)
This commit is contained in:
Roman Khimov 2019-08-12 18:05:04 +03:00
parent bab187f4a8
commit 4e40467dc3

View file

@ -22,10 +22,7 @@ func NewInt(val *big.Int) (*Int, error) {
// Equal will check if two integers hold equal value
func (i *Int) Equal(s *Int) bool {
if i.val.Cmp(s.val) != 0 {
return false
}
return true
return i.val.Cmp(s.val) == 0
}
// Add will add two stackIntegers together