From 55adcb8ca0ca0b7185e917ece137fae218365c89 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 16 Dec 2020 14:21:05 +0100 Subject: all: use tool.Failf instead of local functions --- tools/syz-check/check.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tools/syz-check') diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go index 5961cb6e8..41c9c6b10 100644 --- a/tools/syz-check/check.go +++ b/tools/syz-check/check.go @@ -55,10 +55,6 @@ func main() { for arch := range targets.List[targets.Linux] { arches[arch] = flag.String("obj-"+arch, "", arch+" kernel object file") } - failf := func(msg string, args ...interface{}) { - fmt.Fprintf(os.Stderr, msg+"\n", args...) - os.Exit(1) - } defer tool.Init()() var warnings []Warn for arch, obj := range arches { @@ -68,7 +64,7 @@ func main() { } warnings1, err := check(*flagOS, arch, *obj, *flagDWARF, *flagNetlink) if err != nil { - failf("%v", err) + tool.Fail(err) } warnings = append(warnings, warnings1...) runtime.GC() -- cgit mrf-deployment