aboutsummaryrefslogtreecommitdiffstats
path: root/sys/openbsd/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'sys/openbsd/init.go')
-rw-r--r--sys/openbsd/init.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/openbsd/init.go b/sys/openbsd/init.go
index 2a2aeae4c..5d0c3a77c 100644
--- a/sys/openbsd/init.go
+++ b/sys/openbsd/init.go
@@ -196,12 +196,8 @@ func (arch *arch) neutralizeRlimit(c *prog.Call) {
for _, arg := range args {
switch v := arg.(type) {
case *prog.ConstArg:
- if v.Val < rlimitMin {
- v.Val = rlimitMin
- }
- if v.Val > rlimitMax {
- v.Val = rlimitMax
- }
+ v.Val = max(v.Val, rlimitMin)
+ v.Val = min(v.Val, rlimitMax)
}
}
}