aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-check
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-03-13 08:26:02 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-03-13 08:26:02 +0100
commit05359321bb37f035e55ccfad2cc36b0ea3b50998 (patch)
treecca2148a49dec6832eaac49edb69cf0d84e66a95 /tools/syz-check
parentfd69032d781a476f0e9e1c1c46201167b63059be (diff)
all: fix new golangci-lint warnings
Newer version started producing more warnings. Fix them.
Diffstat (limited to 'tools/syz-check')
-rw-r--r--tools/syz-check/check.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go
index a8d1a26de..060bad99b 100644
--- a/tools/syz-check/check.go
+++ b/tools/syz-check/check.go
@@ -646,15 +646,15 @@ func checkAttrType(typ *prog.StructDesc, payload prog.Type, policy nlaPolicy) st
switch policy.typ {
case NLA_STRING, NLA_NUL_STRING:
if _, ok := payload.(*prog.BufferType); !ok {
- return fmt.Sprintf("expect string")
+ return "expect string"
}
case NLA_NESTED:
if typ.TemplateName() != "nlattr_tt" || typ.Fields[3].(*prog.ConstType).Val != 1 {
- return fmt.Sprintf("should be nlnest")
+ return "should be nlnest"
}
case NLA_BITFIELD32:
if typ.TemplateName() != "nlattr_t" || payload.TemplateName() != "nla_bitfield32" {
- return fmt.Sprintf("should be nlattr[nla_bitfield32]")
+ return "should be nlattr[nla_bitfield32]"
}
case NLA_NESTED_ARRAY, NLA_REJECT:
return fmt.Sprintf("unhandled type %v", policy.typ)