aboutsummaryrefslogtreecommitdiffstats
path: root/core/asm
diff options
context:
space:
mode:
authorZach <zach.ramsay@gmail.com>2017-12-13 02:05:47 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-12-13 02:05:47 +0800
commit3da1bf8ca18f54d9bd2c8c110854dc071ee3898b (patch)
tree8346c96f35f065f098944e425baca74880965232 /core/asm
parentbbea4b2b53be53fc07b620c426bda80732a8814b (diff)
downloaddexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.gz
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.bz2
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.lz
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.xz
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.zst
dexon-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.zip
all: use gometalinter.v2, fix new gosimple issues (#15650)
Diffstat (limited to 'core/asm')
-rw-r--r--core/asm/asm.go5
-rw-r--r--core/asm/compiler.go5
2 files changed, 2 insertions, 8 deletions
diff --git a/core/asm/asm.go b/core/asm/asm.go
index 5fe827e7c..ce22f93f9 100644
--- a/core/asm/asm.go
+++ b/core/asm/asm.go
@@ -114,10 +114,7 @@ func PrintDisassembled(code string) error {
fmt.Printf("%06v: %v\n", it.PC(), it.Op())
}
}
- if err := it.Error(); err != nil {
- return err
- }
- return nil
+ return it.Error()
}
// Return all disassembled EVM instructions in human-readable format.
diff --git a/core/asm/compiler.go b/core/asm/compiler.go
index b2c85375c..318c4e4d8 100644
--- a/core/asm/compiler.go
+++ b/core/asm/compiler.go
@@ -237,10 +237,7 @@ func (c *Compiler) pushBin(v interface{}) {
// isPush returns whether the string op is either any of
// push(N).
func isPush(op string) bool {
- if op == "push" {
- return true
- }
- return false
+ return op == "push"
}
// isJump returns whether the string op is jump(i)