diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-03-08 18:48:26 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-03-08 18:48:26 +0100 |
| commit | 36d1c4540af3ef058d68092e41af05aa4a8c5eca (patch) | |
| tree | 3657a5920e4b100749ccb9d2d555652e7b7e28e9 /pkg/ifuzz | |
| parent | 63ef857906766b3cafe4aebc43bc38edf42096c3 (diff) | |
all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
Diffstat (limited to 'pkg/ifuzz')
| -rw-r--r-- | pkg/ifuzz/encode.go | 2 | ||||
| -rw-r--r-- | pkg/ifuzz/gen/gen.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/ifuzz/encode.go b/pkg/ifuzz/encode.go index 799def63a..0b3732aa7 100644 --- a/pkg/ifuzz/encode.go +++ b/pkg/ifuzz/encode.go @@ -76,7 +76,7 @@ func (insn *Insn) Encode(cfg *Config, r *rand.Rand) []byte { rex = byte(0x40 | r.Intn(16)) if insn.Rexw == 1 { rex |= 1 << 3 - } else if insn.Rexw == 1 { + } else { rex &^= 1 << 3 } rexR = rex&0x4 != 0 diff --git a/pkg/ifuzz/gen/gen.go b/pkg/ifuzz/gen/gen.go index 47822780c..1ad725e12 100644 --- a/pkg/ifuzz/gen/gen.go +++ b/pkg/ifuzz/gen/gen.go @@ -504,7 +504,7 @@ func parseModrm(v string) (int8, error) { } vv *= 2 if v[i] == '1' { - vv += 1 + vv++ } } return vv, nil |
