From 4e40467dc38f1261f7523fed7d8731d7e9b6ffdb Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 12 Aug 2019 18:05:04 +0300 Subject: [PATCH] pkg/vm/stack: fix S1008 gosimple warning from GolangCI S1008: should use 'return ' instead of 'if { return }; return ' (from gosimple) --- pkg/vm/stack/Int.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/vm/stack/Int.go b/pkg/vm/stack/Int.go index 903190541..d1c06e572 100644 --- a/pkg/vm/stack/Int.go +++ b/pkg/vm/stack/Int.go @@ -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