Merge pull request #49894 from thaJeztah/daemon_less_output_vars

daemon/*: reduce named (error)-returns, naked returns, and some minor linting-fixes
This commit is contained in:
Sebastiaan van Stijn
2025-05-01 10:19:50 +02:00
committed by GitHub
29 changed files with 121 additions and 122 deletions

View File

@@ -413,7 +413,7 @@ func adaptSharedNamespaceContainer(daemon containerGetter, hostConfig *container
}
// verifyPlatformContainerResources performs platform-specific validation of the container's resource-configuration
func verifyPlatformContainerResources(resources *containertypes.Resources, sysInfo *sysinfo.SysInfo, update bool) (warnings []string, err error) {
func verifyPlatformContainerResources(resources *containertypes.Resources, sysInfo *sysinfo.SysInfo, update bool) (warnings []string, _ error) {
fixMemorySwappiness(resources)
// memory subsystem checks and adjustments
@@ -650,7 +650,7 @@ func isRunningSystemd() bool {
// verifyPlatformContainerSettings performs platform-specific validation of the
// hostconfig and config structures.
func verifyPlatformContainerSettings(daemon *Daemon, daemonCfg *configStore, hostConfig *containertypes.HostConfig, update bool) (warnings []string, err error) {
func verifyPlatformContainerSettings(daemon *Daemon, daemonCfg *configStore, hostConfig *containertypes.HostConfig, update bool) (warnings []string, _ error) {
if hostConfig == nil {
return nil, nil
}