mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon: remove/rename err-returns and remove naked returns
Prevent accidentally shadowing these errors, which are used in defers, and remove naked returns. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -226,10 +226,10 @@ func (daemon *Daemon) setHostConfig(container *container.Container, hostConfig *
|
||||
|
||||
// verifyContainerSettings performs validation of the hostconfig and config
|
||||
// structures.
|
||||
func (daemon *Daemon) verifyContainerSettings(daemonCfg *configStore, hostConfig *containertypes.HostConfig, config *containertypes.Config, update bool) (warnings []string, err error) {
|
||||
func (daemon *Daemon) verifyContainerSettings(daemonCfg *configStore, hostConfig *containertypes.HostConfig, config *containertypes.Config, update bool) (warnings []string, _ error) {
|
||||
// First perform verification of settings common across all platforms.
|
||||
if err = validateContainerConfig(config); err != nil {
|
||||
return warnings, err
|
||||
if err := validateContainerConfig(config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
warns, err := validateHostConfig(hostConfig)
|
||||
|
||||
Reference in New Issue
Block a user