mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-26 21:00:30 +00:00
all: fix dup types in func args
This commit is contained in:
parent
85b1d37b14
commit
813f363bff
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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++ {
|
||||
|
Loading…
Reference in New Issue
Block a user