From 8c0c1c8906661de47f654fb7e3bc5b7cbb224ca5 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 1 Apr 2025 15:02:20 -0700 Subject: [PATCH] libpod: fix wastedassign warning on freebsd This one: > libpod/container_internal_freebsd.go:255:2: assigned to foundUTS, but reassigned without using the value (wastedassign) > foundUTS := false > ^ Signed-off-by: Kir Kolyshkin --- libpod/container_internal_freebsd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libpod/container_internal_freebsd.go b/libpod/container_internal_freebsd.go index c3e4f4f540..2db1b19c41 100644 --- a/libpod/container_internal_freebsd.go +++ b/libpod/container_internal_freebsd.go @@ -255,10 +255,9 @@ func (c *Container) addSharedNamespaces(g *generate.Generator) error { // the user (already present in OCI spec). If we don't have a UTS ns, // set it to the host's hostname instead. hostname := c.Hostname() - foundUTS := false // TODO: make this optional, needs progress on adding FreeBSD section to the spec - foundUTS = true + foundUTS := true g.SetHostname(hostname) if !foundUTS {