diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-01-17 10:28:16 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-01-17 10:02:07 +0000 |
| commit | 5d04aae8969f6c72318ce0a4cde4f027766b1a55 (patch) | |
| tree | 8f1b632847c431407090f0fe1335522ff2195a37 /prog/decodeexec.go | |
| parent | f9e07a6e597b68d3397864e6ee4550f9065c3518 (diff) | |
all: use min/max functions
They are shorter, more readable, and don't require temp vars.
Diffstat (limited to 'prog/decodeexec.go')
| -rw-r--r-- | prog/decodeexec.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/prog/decodeexec.go b/prog/decodeexec.go index 81c70cb2b..e6921c314 100644 --- a/prog/decodeexec.go +++ b/prog/decodeexec.go @@ -293,9 +293,7 @@ func (dec *execDecoder) commitCall() { dec.numVars = dec.call.Index + 1 } for _, copyout := range dec.call.Copyout { - if dec.numVars < copyout.Index+1 { - dec.numVars = copyout.Index + 1 - } + dec.numVars = max(dec.numVars, copyout.Index+1) } dec.calls = append(dec.calls, dec.call) dec.call = ExecCall{} |
