1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 06:45:31 +01:00

Merge pull request #25743 from kolyshkin/freebsd-golangci-lint

Add freebsd golangci lint run; fix remaining freebsd warnings
This commit is contained in:
openshift-merge-bot[bot]
2025-04-03 18:30:54 +00:00
committed by GitHub
19 changed files with 101 additions and 125 deletions

View File

@@ -48,7 +48,9 @@ func DevicesFromPath(g *generate.Generator, devicePath string, config *config.Co
}
if st.IsDir() {
// For devfs, we need to add the directory as well
addDevice(g, resolvedDevicePath)
if err := addDevice(g, resolvedDevicePath); err != nil {
return err
}
found := false
src := resolvedDevicePath

View File

@@ -57,5 +57,5 @@ func specConfigureNamespaces(s *specgen.SpecGenerator, g *generate.Generator, rt
// only if we can initialise the network after the OCI container is created -
// the OCI container will own the vnet in this case.
func needPostConfigureNetNS(s *specgen.SpecGenerator) bool {
return jail.NeedVnetJail() == false
return !jail.NeedVnetJail()
}

View File

@@ -12,7 +12,6 @@ import (
"github.com/containers/podman/v5/libpod"
"github.com/containers/podman/v5/libpod/define"
"github.com/containers/podman/v5/pkg/specgen"
"github.com/opencontainers/runtime-spec/specs-go"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
)
@@ -175,6 +174,6 @@ func WeightDevices(wtDevices map[string]spec.LinuxWeightDevice) ([]spec.LinuxWei
return devs, nil
}
func subNegativeOne(u specs.POSIXRlimit) specs.POSIXRlimit {
func subNegativeOne(u spec.POSIXRlimit) spec.POSIXRlimit {
return u
}