From 3e0ce485a16298c2b5ffd75f482e3845ac21c66c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 5 Jul 2020 11:42:38 +0200 Subject: tools/syz-linter: check variable declarations Warn about: var x int = foo In most cases this can be expressed shorter as: var x int x := foo x := int(foo) Update #1876 --- sys/openbsd/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/openbsd/init.go b/sys/openbsd/init.go index f24f06273..3ed07b013 100644 --- a/sys/openbsd/init.go +++ b/sys/openbsd/init.go @@ -134,8 +134,8 @@ func (arch *arch) neutralize(c *prog.Call) { flags := c.Args[0].(*prog.ConstArg) flags.Val &= ^mclFuture case "setrlimit": - var rlimitMin uint64 - var rlimitMax uint64 = math.MaxUint64 + rlimitMin := uint64(0) + rlimitMax := uint64(math.MaxUint64) resource := c.Args[0].(*prog.ConstArg).Val & rlimitMask if resource == rlimitData { // OpenBSD performs a strict validation of the -- cgit mrf-deployment