diff options
| -rw-r--r-- | pkg/ast/ast.go | 2 | ||||
| -rw-r--r-- | pkg/build/akaros.go | 2 | ||||
| -rw-r--r-- | pkg/build/freebsd.go | 2 | ||||
| -rw-r--r-- | pkg/compiler/check.go | 2 | ||||
| -rw-r--r-- | pkg/cover/cover.go | 2 | ||||
| -rw-r--r-- | pkg/csource/options.go | 2 | ||||
| -rw-r--r-- | pkg/email/patch.go | 2 | ||||
| -rw-r--r-- | pkg/ifuzz/pseudo.go | 2 | ||||
| -rw-r--r-- | pkg/report/report.go | 5 | ||||
| -rw-r--r-- | pkg/symbolizer/nm_test.go | 2 | ||||
| -rw-r--r-- | pkg/vcs/git_test_util.go | 2 | ||||
| -rw-r--r-- | sys/fuchsia/fidlgen/main.go | 2 | ||||
| -rw-r--r-- | sys/syz-extract/netbsd.go | 2 | ||||
| -rw-r--r-- | syz-fuzzer/fuzzer_test.go | 2 |
14 files changed, 15 insertions, 16 deletions
diff --git a/pkg/ast/ast.go b/pkg/ast/ast.go index 991d27ffc..c0707aca9 100644 --- a/pkg/ast/ast.go +++ b/pkg/ast/ast.go @@ -19,7 +19,7 @@ type Description struct { // Node is AST node interface. type Node interface { - Info() (pos Pos, typ string, name string) + Info() (pos Pos, typ, name string) // Clone makes a deep copy of the node. Clone() Node // walk calls callback cb for all child nodes of this node. diff --git a/pkg/build/akaros.go b/pkg/build/akaros.go index 2a3b8c8ea..73f4e9ac8 100644 --- a/pkg/build/akaros.go +++ b/pkg/build/akaros.go @@ -109,7 +109,7 @@ func (ctx akaros) make(kernelDir, runDir string, args ...string) error { return ctx.cmd(kernelDir, runDir, "make", args...) } -func (ctx akaros) cmd(kernelDir, runDir string, bin string, args ...string) error { +func (ctx akaros) cmd(kernelDir, runDir, bin string, args ...string) error { cmd := osutil.Command(bin, args...) if err := osutil.Sandbox(cmd, true, false); err != nil { return err diff --git a/pkg/build/freebsd.go b/pkg/build/freebsd.go index 3c1f300a3..67e731312 100644 --- a/pkg/build/freebsd.go +++ b/pkg/build/freebsd.go @@ -93,7 +93,7 @@ func (ctx freebsd) clean(kernelDir, targetArch string) error { return ctx.make(kernelDir, objPrefix, "cleanworld") } -func (ctx freebsd) make(kernelDir string, objPrefix string, makeArgs ...string) error { +func (ctx freebsd) make(kernelDir, objPrefix string, makeArgs ...string) error { args := append([]string{ fmt.Sprintf("MAKEOBJDIRPREFIX=%v", objPrefix), "make", diff --git a/pkg/compiler/check.go b/pkg/compiler/check.go index 317ce5ae5..e8abc574e 100644 --- a/pkg/compiler/check.go +++ b/pkg/compiler/check.go @@ -1059,7 +1059,7 @@ func expectedTypeArgs(desc *typeDesc, needBase bool) string { return expect } -func checkTypeKind(t *ast.Type, kind int) (unexpected string, expect string, ok bool) { +func checkTypeKind(t *ast.Type, kind int) (unexpected, expect string, ok bool) { switch { case kind == kindAny: ok = true diff --git a/pkg/cover/cover.go b/pkg/cover/cover.go index 43b243b4b..1fe63e3ad 100644 --- a/pkg/cover/cover.go +++ b/pkg/cover/cover.go @@ -25,6 +25,6 @@ func (cov Cover) Serialize() []uint32 { return res } -func RestorePC(pc uint32, base uint32) uint64 { +func RestorePC(pc, base uint32) uint64 { return uint64(base)<<32 + uint64(pc) } diff --git a/pkg/csource/options.go b/pkg/csource/options.go index b8fb804fb..00f83157f 100644 --- a/pkg/csource/options.go +++ b/pkg/csource/options.go @@ -259,7 +259,7 @@ func defaultFeatures(value bool) Features { } } -func ParseFeaturesFlags(enable string, disable string, defaultValue bool) (Features, error) { +func ParseFeaturesFlags(enable, disable string, defaultValue bool) (Features, error) { const ( none = "none" all = "all" diff --git a/pkg/email/patch.go b/pkg/email/patch.go index e398dbff8..80fac6097 100644 --- a/pkg/email/patch.go +++ b/pkg/email/patch.go @@ -10,7 +10,7 @@ import ( "strings" ) -func ParsePatch(text string) (title string, diff string, err error) { +func ParsePatch(text string) (title, diff string, err error) { s := bufio.NewScanner(strings.NewReader(text)) lastLine := "" diffStarted := false diff --git a/pkg/ifuzz/pseudo.go b/pkg/ifuzz/pseudo.go index ebfa09723..306725d2e 100644 --- a/pkg/ifuzz/pseudo.go +++ b/pkg/ifuzz/pseudo.go @@ -495,7 +495,7 @@ func (gen *generator) out8(port uint16, v uint8) { gen.byte(0xee) // out %dx, %al } -func (gen *generator) out16(port uint16, v uint16) { +func (gen *generator) out16(port, v uint16) { gen.mov16(regDX, port) gen.mov16(regAX, v) gen.operand16() diff --git a/pkg/report/report.go b/pkg/report/report.go index 6dcd6aec7..af2ee782d 100644 --- a/pkg/report/report.go +++ b/pkg/report/report.go @@ -356,7 +356,7 @@ type stackFmt struct { extractor frameExtractor } -type frameExtractor func(frames []string) (frame string, corrupted string) +type frameExtractor func(frames []string) (frame, corrupted string) var parseStackTrace *regexp.Regexp @@ -400,8 +400,7 @@ func matchOops(line []byte, oops *oops, ignores []*regexp.Regexp) bool { return true } -func extractDescription(output []byte, oops *oops, params *stackParams) ( - desc string, corrupted string, format oopsFormat) { +func extractDescription(output []byte, oops *oops, params *stackParams) (desc, corrupted string, format oopsFormat) { startPos := len(output) matchedTitle := false for _, f := range oops.formats { diff --git a/pkg/symbolizer/nm_test.go b/pkg/symbolizer/nm_test.go index 8c6e5ba25..482f717fa 100644 --- a/pkg/symbolizer/nm_test.go +++ b/pkg/symbolizer/nm_test.go @@ -52,7 +52,7 @@ func TestSymbols(t *testing.T) { } } -func symcmp(want Symbol, got Symbol) bool { +func symcmp(want, got Symbol) bool { if want.Addr != got.Addr { return false } diff --git a/pkg/vcs/git_test_util.go b/pkg/vcs/git_test_util.go index 4b62582ec..09f5a6af6 100644 --- a/pkg/vcs/git_test_util.go +++ b/pkg/vcs/git_test_util.go @@ -110,7 +110,7 @@ func CreateTestRepo(t *testing.T, baseDir, name string) *TestRepo { return repo } -func CloneTestRepo(t *testing.T, baseDir string, name string, originRepo *TestRepo) *TestRepo { +func CloneTestRepo(t *testing.T, baseDir, name string, originRepo *TestRepo) *TestRepo { dir := filepath.Join(baseDir, name) if err := osutil.MkdirAll(dir); err != nil { t.Fatal(err) diff --git a/sys/fuchsia/fidlgen/main.go b/sys/fuchsia/fidlgen/main.go index 63f1ca120..8c48ac312 100644 --- a/sys/fuchsia/fidlgen/main.go +++ b/sys/fuchsia/fidlgen/main.go @@ -93,7 +93,7 @@ func main() { } } -func fidlgen(fidlgenPath string, jsonPath string, txtPathBase string) string { +func fidlgen(fidlgenPath, jsonPath, txtPathBase string) string { if !osutil.IsExist(jsonPath) { failf("cannot find %s", jsonPath) } diff --git a/sys/syz-extract/netbsd.go b/sys/syz-extract/netbsd.go index 27ebe3ec3..4f5cf84e8 100644 --- a/sys/syz-extract/netbsd.go +++ b/sys/syz-extract/netbsd.go @@ -38,7 +38,7 @@ func (*netbsd) prepareArch(arch *Arch) error { return nil } -func machineLink(arch *Arch, machine string, dest string) error { +func machineLink(arch *Arch, machine, dest string) error { if err := os.Symlink(machineInclude(arch, machine), filepath.Join(arch.buildDir, dest)); err != nil { return fmt.Errorf("failed to create link: %v", err) diff --git a/syz-fuzzer/fuzzer_test.go b/syz-fuzzer/fuzzer_test.go index 916e75ef5..04b582622 100644 --- a/syz-fuzzer/fuzzer_test.go +++ b/syz-fuzzer/fuzzer_test.go @@ -78,7 +78,7 @@ func TestAddInputConcurrency(t *testing.T) { } } -func generateInput(target *prog.Target, rs rand.Source, ncalls int, sizeSig int) (inp InputTest) { +func generateInput(target *prog.Target, rs rand.Source, ncalls, sizeSig int) (inp InputTest) { inp.p = target.Generate(rs, ncalls, target.DefaultChoiceTable()) var raw []uint32 for i := 1; i <= sizeSig; i++ { |
