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. --- pkg/vcs/linux.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkg/vcs') diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index d348dd71e..c0b96aaa4 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -109,9 +109,7 @@ func gitReleaseTagToInt(tag string, includeRC bool) uint64 { if v1 < 0 { return 0 } - if v3 < 0 { - v3 = 0 - } + v3 = max(v3, 0) if rc >= 0 { if !includeRC { return 0 -- cgit mrf-deployment