diff --git a/daemon/daemon.go b/daemon/daemon.go index 5159d4f7da..3321fea773 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -177,10 +177,10 @@ func (daemon *Daemon) load(id string) (*Container, error) { } if container.ID != id { - return &container, fmt.Errorf("Container %s is stored at %s", container.ID, id) + return container, fmt.Errorf("Container %s is stored at %s", container.ID, id) } - return &container, nil + return container, nil } // Register makes a container object usable by the daemon as @@ -492,7 +492,7 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, imgID base.Driver = daemon.driver.String() base.ExecDriver = daemon.execDriver.Name() - return &base, err + return base, err } // GetFullContainerName returns a constructed container name. I think diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 7431580cbb..c94ea49b52 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -599,8 +599,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig. return nil } -func (daemon *Daemon) newBaseContainer(id string) Container { - return Container{ +func (daemon *Daemon) newBaseContainer(id string) *Container { + return &Container{ CommonContainer: CommonContainer{ ID: id, State: NewState(), diff --git a/daemon/daemon_windows.go b/daemon/daemon_windows.go index b829a8fd19..258891a51f 100644 --- a/daemon/daemon_windows.go +++ b/daemon/daemon_windows.go @@ -140,8 +140,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig. return nil } -func (daemon *Daemon) newBaseContainer(id string) Container { - return Container{ +func (daemon *Daemon) newBaseContainer(id string) *Container { + return &Container{ CommonContainer: CommonContainer{ ID: id, State: NewState(),