aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-07-05 11:42:38 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-07-06 08:23:03 +0200
commit3e0ce485a16298c2b5ffd75f482e3845ac21c66c (patch)
treec8877f362d6c5cb6f2ce2fff974825f2b3ce79c1 /sys
parented2ced4c694aef828d8dfbaa9d8a459ac2c72043 (diff)
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
Diffstat (limited to 'sys')
-rw-r--r--sys/openbsd/init.go4
1 files changed, 2 insertions, 2 deletions
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