From 5d04aae8969f6c72318ce0a4cde4f027766b1a55 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 17 Jan 2025 10:28:16 +0100 Subject: all: use min/max functions They are shorter, more readable, and don't require temp vars. --- prog/decodeexec.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'prog/decodeexec.go') 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{} -- cgit mrf-deployment